Skip to content

v2.0.0 — Universal Shader Translator

Latest

Choose a tag to compare

@NripeshN NripeshN released this 01 Jun 11:05
be06570

CrossTL v2.0.0

A ground-up expansion of the CrossGL language and all 9 translation backends.

Highlights

  • CrossGL language v2: Generics, traits, algebraic enums, pattern matching, do-while loops, double-precision types
  • Validation layer: 2700+ lines of texture intrinsic, stage, and resource validation
  • Plugin system: Backends self-register via BackendSpec/SourceSpec for third-party extensibility
  • 9 backends massively expanded: 10-20x more generated code surface (GLSL, HLSL, Metal, SPIR-V, CUDA, HIP, Mojo, Rust, Slang)
  • 7,983 passing tests (up from ~200 at v1.0.0)
  • Full CI matrix: Cross-platform (Linux/Windows/macOS) × Python 3.8–3.13 × per-backend

Breaking Changes

  • .cgl files using new syntax (generics, traits, match) are not backward-compatible with v1.x parsers
  • Internal AST restructured: ASTNode gained child_nodes(), walk(), bind_parent_links(); ShaderNode.stages is now a StageMap
  • Direct internal module imports (from crosstl.translator.codegen import X) removed — use the registry or crosstl.translate()

Install

pip install crosstl==2.0.0

Backend Compatibility

All backends support core CrossGL. Advanced features with partial coverage:

Feature Not yet supported in
Generic functions SPIR-V, CUDA, HIP, Mojo, Slang
Geometry stage Metal, CUDA, HIP, Mojo, Rust
Tessellation stage OpenGL, Metal, CUDA, HIP, Mojo, Rust
Mesh/Task stage CUDA, HIP, Mojo, Rust, Slang

Full Changelog

See CHANGELOG.md or compare: release-1.0.0...v2.0.0