Releases: CrossGL/crosstl
Release list
CrossTL 3.1.0
Added
- Portable runtime execution graphs, deterministic runtime variant registries, and request generation from native loader descriptors.
- Generated native loader execution ABI packages with deterministic C11 and C++17 host integration artifacts.
- Native compute runtime drivers and project-runner adapters for Direct3D, headless OpenGL, and Vulkan.
- Initialized read-write resources, shared native allocation views, aggregate byte views, and private-array partition views for native execution.
- Cooperative-matrix types and fragment contracts in the shared IR, including Vulkan KHR cooperative-matrix SPIR-V lowering foundations.
- Pinned MLX project translation and validation across DirectX, OpenGL, and Vulkan, including reduced-frontier and full-corpus workflows.
Improved
- Metal project materialization for templates, overloads, references, pointer inference, constexpr propagation, wide vectors, and aggregate return types.
- DirectX lowering for fixed arrays, 16-bit arithmetic, overload identity, resource relocation, specialization constants, and runtime dispatch.
- OpenGL lowering for storage aliases, interface-backed structs, specialization constants, scalar conversions, reserved identifiers, and runtime-derived globals.
- Runtime manifests and host handoff metadata now track selected entry points, device readiness, execution resources, and native loader package identities.
- MLX compiler-frontier accounting, native validation, and runtime proofs now cover more kernels and fail closed on unsupported contracts.
Fixed
- Source-language arithmetic conversion order, explicit constructor handling, boolean compound assignments, conditional expressions, and file-scope constant preservation across target backends.
- Metal alias-template, receiver, reference-accessor, addressed-pointer, and overload-resolution edge cases encountered in project-scale translation.
- DirectX entry-point validation, fixed-array initialization, aggregate conditionals, minimum-precision division and remainder, and unrepresentable texture-offset diagnostics.
- OpenGL block-name collisions, partial vector initialization, fixed-array loops, static-member layout leakage, and correlated private pointer views.
- SPIR-V helper return lowering, empty aggregate typing, unresolved generic storage analysis, and cooperative-matrix memory operations.
v3.0.0
CrossTL v3.0.0
Major feature milestone release with 417 commits since v2.0.0.
Added
- Target-only WebGL/WebGL2 GLSL ES backend with vertex and fragment stage output.
- Target-only WebGPU/WGSL backend with vertex, fragment, and compute output.
- DirectX target profile aliases (
dx11,dx12,d3d11,d3d12) all resolving to HLSL source output. - MLX project porting integration with demos, CI workflow, and full-corpus validation.
- Runtime host integration pipeline: loader scaffolds, adapter descriptors, manifest metadata, and execution adapters.
- Project-scale shader porting pipeline with runtime readiness checks and blocked-unit tracking.
- Metal struct-template materialization engine with instantiation, specialization, SFINAE-overloaded member lowering, and budget scaling.
- Metal subgroup/SIMD intrinsic lowering to CrossGL Wave ops.
- Metal atomic device lowering to CrossGL atomic intrinsics.
- Metal threadgroup-local array hoisting to GLSL shared globals.
- Runtime parity executors and verification harness for translated GPU artifacts.
- WGSL resource binding, storage buffer, and texture sampler object model support.
- Naga-based WGSL validation for generated project artifacts.
- SPIR-V artifact assembly and validation pipeline.
- Host runtime detection for WebGPU, OpenCL, D3D11, Rust wgpu, and game engine runtimes.
- Open-source project porting demos with third-party notice coverage and failure summary reporting.
- Runtime loader manifest generation and package inspection commands.
- Host integration handoff bundles with blocked-step reporting.
- Integer sampled texture lowering across backends.
- GLSL specialization constant lowering for target backends.
- Metal function constant lowering for SPIR-V output.
- Backend-agnostic runtime manifest metadata for cross-target artifact planning.
Improved
- Metal preprocessor: full-source comment masking, functor lowering, template budget scaling, deterministic member lowering, and constexpr array extent recognition.
- HLSL compute codegen: value-builtin lowering, subgroup-to-wave translation, semantic validation, and program-scope constant output.
- GLSL codegen: subgroup builtins, specialization constants, vertex layout location mapping, storage image lowering, and fragment invocation density modeling.
- SPIR-V codegen: storage buffer overload resolution, 64-bit layout validation, bool compute interfaces, access-chain typing, and gather offset vector operands.
- DirectX codegen: groupshared hoisting, resource binding allocation, fragment varying semantics, typed buffer indexed writes, and loader profile metadata.
- OpenGL codegen: Metal template specialization, buffer parameter lowering, stage input struct mapping, uniform block member disambiguation, and GLSL 330 resource bindings.
- OpenCL reduce target artifact generation, diagnostics, and helper contract reporting.
- Rust-GPU: vertex input lowering, compute construct lowering, storage buffer declarations, and Option value pre-lowering.
- Mojo: GPU kernel extraction, vector overload resolution, compute builtin parameterization, and sampled texture binding lowering.
- Slang: resource name collision avoidance, default parameter preservation, texture size query casting, and compute entry lowering.
- WGSL: structured storage buffers, constant buffer block lowering, derivative intrinsic mapping, image2D storage textures, and reserved identifier escaping.
- Project translation: unresolved-construct guardrails, source provenance tracking, macro variant classification, include resolution, and feature root scanning.
- Support matrix tooling: target alias metadata, target-only source rejection documentation, and backend conformance edge coverage.
- Split target backend registration from native source frontend availability in the backend registry and support matrix.
- Test suite grown to 13,485 collected tests (from ~8,000 at v2.0.0).
Fixed
- Over 100 targeted backend bug fixes across CUDA, HIP, Metal, GLSL, HLSL, SPIR-V, WGSL, OpenCL, Rust-GPU, Mojo, and Slang.
- Metal residual-template false positives from struct member templates.
- SPIR-V storage buffer pointer overload inference and access-chain index typing.
- WGSL vector narrowing, entry struct varying locations, reserved identifier escaping, and uniform scalar array layout.
- DirectX vertex input semantics, scalar fragment targets, binding allocation, and groupshared hoist aliases.
- HLSL compute value-builtin leakage, scalar splat swizzle lowering, and array semantic allocation.
- OpenGL bfloat16 asuint lowering, GLSL 110 interface qualifiers, and gl_FragColor reserved local conflicts.
- Vulkan matmul builtin vector stores, complex helper call argument types, and private scalar initializer types.
- HIP scalar kernel params, bit-extract kernel loop preservation, and host main artifact generation.
- CUDA vector-add DirectX lowering and OpenGL uniform name stabilization.
- Metal-to-DirectX compute resource output and constant buffer member SPIR-V access.
- Mojo GPU builtin lowering contract and vector-add Metal/SPIR-V artifacts.
- Slang compute entry lowering to OpenGL and struct resource name collisions.
- WebGL dynamic sampler array helper calls and unsupported sampler resource rejection.
- GLSL usampler texelFetch SPIR-V lowering and fragment output name handling.
- Python 3.8 collection type compatibility in the project pipeline.
Install: pip install crosstl==3.0.0
Full changelog: https://github.com/CrossGL/crosstl/blob/main/CHANGELOG.md
v2.0.0 — Universal Shader Translator
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/SourceSpecfor 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
.cglfiles using new syntax (generics, traits, match) are not backward-compatible with v1.x parsers- Internal AST restructured:
ASTNodegainedchild_nodes(),walk(),bind_parent_links();ShaderNode.stagesis now aStageMap - Direct internal module imports (
from crosstl.translator.codegen import X) removed — use the registry orcrosstl.translate()
Install
pip install crosstl==2.0.0Backend 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
CrossTL 1.0.0: Universal Programming Language & Translator
🌍 CrossTL 1.0.0 - Universal Programming Language & Translator
The first stable release of CrossTL marks a revolutionary milestone in universal programming language translation. What began as a shader translation tool has evolved into a comprehensive universal programming language ecosystem with production-ready quality.
🎯 Major Achievements
🔬 Test Suite Excellence
- 100% Test Suite Success Rate (508/508 tests passing)
- 88.3% Examples Success Rate (53/60 tests) across all backends
- 91.4% Success Rate excluding experimental backends
- Zero regressions in core functionality
🌐 Universal Translation Support
9 Production-Ready Backend Languages:
- Graphics APIs: Metal, DirectX (HLSL), OpenGL (GLSL), Vulkan (SPIRV)
- Systems Languages: Rust, Mojo
- GPU Computing: CUDA, HIP
- Specialized: Slang (real-time graphics)
🏗️ CrossGL Language Evolution
- Complete Programming Language: Beyond shaders to full algorithmic programming
- Advanced Control Flow: Switch statements, pattern matching, complex conditionals
- Rich Type System: Generics, algebraic data types, memory layout control
- Parallel Computing: GPU compute shaders, workgroup operations, memory barriers
- Bidirectional Translation: Import existing code from any supported language
🔧 Technical Infrastructure
🛡️ Parser Robustness
- Infinite Loop Protection: Advanced EOF handling and loop detection
- Enhanced Error Recovery: Graceful degradation on complex syntax
- Assignment Operators: Complete support for compound assignments (
>>=,<<=, etc.) - Switch Statement Support: Full implementation with case handling and break statements
💻 Backend Code Generation
- Production Quality: Generated code ranges from 696B to 18K+ characters
- Cross-Platform Compatibility: Windows CI/CD with ASCII-compatible output
- Array Type Fixes: Resolved ArrayType vs MatrixType confusion across all backends
- Enhanced Type Conversion: Improved handling across Metal, DirectX, and GLSL
🔄 Translation Pipeline
- Lexical Analysis → Syntax Analysis → Semantic Analysis
- IR Generation → Optimization Passes → Target Generation
- Post-Processing → Platform-Specific Optimizations
🚀 Use Cases & Applications
- Cross-Platform Graphics: Universal shader development
- AI Kernel Development: Deploy ML algorithms across GPU platforms
- Systems Programming: Memory-safe code generation
- High-Performance Computing: Parallel algorithm implementation
- Game Development: Real-time graphics and compute shaders
- Research & Education: Universal programming language exploration
📊 Performance Metrics
# Translation Success Rates by Backend
Metal: 100% (Perfect code generation)
DirectX: 100% (Complete HLSL compatibility)
OpenGL: 100% (Full GLSL support)
Rust: 100% (Memory-safe systems code)
CUDA: 100% (High-performance GPU computing)
HIP: 100% (AMD GPU compatibility)
Mojo: 95% (AI-optimized performance)
Vulkan: 85% (SPIR-V generation)
Slang: 80% (Specialized graphics)🛠️ Installation & Quick Start
# Install from PyPI
pip install crosstl==1.0.0
# Universal translation example
crosstl shader.cgl --backend metal --output shader.metal
crosstl algorithm.cgl --backend rust --output algorithm.rs
crosstl compute.cgl --backend cuda --output compute.cu📈 What's New in 1.0.0
✨ Major Features
- Universal Language Positioning: Complete ecosystem for cross-platform development
- Bidirectional Translation: Import existing codebases to CrossGL
- Production-Ready Quality: Comprehensive testing and validation
- Windows Compatibility: Full CI/CD support across platforms
🔧 Technical Improvements
- Enhanced Parser: Robust handling of complex syntax patterns
- Memory Management: Advanced buffer abstractions and pointer safety
- Type System: Generic programming with algebraic data types
- Parallel Processing: Workgroup operations and memory barriers
📚 Documentation & Resources
- Complete README Transformation: Universal language positioning
- Enhanced Examples: AI kernels, systems programming, graphics pipelines
- Comprehensive Guides: Cross-platform deployment strategies
- Community Resources: Discord, documentation, and contribution guides
🔬 Quality Assurance
- Comprehensive Testing: 508 automated tests covering all functionality
- Cross-Platform Validation: Windows, macOS, and Linux compatibility
- Performance Benchmarking: Optimized code generation across all backends
- Real-World Examples: Verified with complex shaders and algorithms
🌟 Community & Ecosystem
- Open Source: Apache License 2.0
- Active Community: Discord server and GitHub discussions
- Contribution-Friendly: Comprehensive contributing guidelines
- Documentation: CrossGL Language Reference
🔮 Future Vision
CrossTL 1.0.0 establishes the foundation for the future of universal programming:
- One Language, Infinite Platforms: Write once, deploy everywhere
- AI-First Development: Optimized for machine learning workflows
- Next-Generation Graphics: Advanced rendering and compute pipelines
- Universal Portability: Seamless code migration across ecosystems
📦 Installation
pip install crosstl==1.0.0🔗 Links
- Documentation: https://crossgl.github.io/crossgl-docs/
- PyPI Package: https://pypi.org/project/crosstl/1.0.0/
- Examples: examples/
- Contributing: CONTRIBUTING.md
Join the Universal Programming Revolution! 🌍
CrossTL Team
CrossTL version 0.0.1.3
A few bugs have been patched in this minor release of the CrossGL Translator and save_shader flag has been added to the translate function.
CrossTL version 0.0.1.2
A few bugs have been patched in this minor release of the CrossGL Translator.
CrossTL version 0.0.1.1
We are excited to announce that the CrossGL Translator has been published as a pip package on PyPI. This means you can easily integrate it into your projects and start seeing the benefits right away. 📦 Check out our comprehensive documentation here to get started: CrossGL Docs.