Backend Support¶
CrossGL Translator keeps source imports and target code generators in separate registries. A language can be available as an input source, an output target, or both.
Built-in targets¶
Target |
Backend name |
Aliases |
Output extension |
|---|---|---|---|
DirectX / HLSL |
|
|
|
OpenGL / GLSL |
|
|
|
Metal |
|
|
|
Vulkan SPIR-V |
|
|
|
CUDA |
|
|
|
HIP |
|
|
|
Mojo |
|
|
|
Rust |
|
|
|
Slang |
|
|
|
Built-in sources¶
Source |
Registry name |
Extensions |
Reverse CrossGL generation |
|---|---|---|---|
CrossGL |
|
|
Native source format |
DirectX / HLSL |
|
|
Yes |
OpenGL / GLSL |
|
|
Yes |
Metal |
|
|
Yes |
Vulkan SPIR-V |
|
|
Yes |
CUDA |
|
|
Yes |
HIP |
|
|
Yes |
Mojo |
|
|
Yes |
Rust |
|
|
Yes |
Slang |
|
|
Yes |
Runtime discovery¶
The public helpers crosstl.supported_backends() and
crosstl.supported_sources() return the names registered in the current
process. Plugin modules under crosstl.backend can add more source or target
entries at runtime.