What is CubeCL?
mainCubeCL is a multi-platform high-performance compute language extension for Rust. It acts as a Just-in-Time (JIT) compiler and provides a set of runtimes for writing high-performance compute kernels.
By using the #[cube] macro, a single Rust function can be compiled on demand to multiple backends including:
- CUDA (NVIDIA)
- HIP (AMD)
- Metal (Apple)
- SPIR-V (Vulkan)
- WGSL (WebGPU)
- CPU SIMD
This allows developers to write kernels once in regular Rust (benefiting from type-checking, borrow-checking, and composability) while achieving peak performance on each specific hardware target.