cuda-oxide is a Rust-to-CUDA compiler that lets you write SIMT GPU kernels in safe, idiomatic Rust by compiling standard Rust code directly to PTX without DSLs or foreign language bindings.
The tool solves the problem of writing GPU kernels while maintaining Rust's safety guarantees and ergonomics. It works by implementing a custom rustc backend that compiles functions marked with `#[kernel]` to CUDA PTX. Host and device code live in the same file and are built together with a single `cargo oxide build` command. The compilation pipeline flows from Rust through Rust MIR to Pliron IR, then to LLVM IR, and finally to PTX. The project provides device-side abstractions for type-safe indexing, shared memory, scoped atomics, barriers, TMA operations, and warp/cluster operations, along with a host-side runtime for memory management, pinned transfers, and kernel launching.
Developers should adopt this tool if they want to write GPU kernels in pure Rust without learning CUDA C++ or managing separate compilation pipelines. It suits projects where single-source compilation and Rust's type system benefits outweigh the current alpha status. The tool is particularly valuable for teams already invested in Rust who need GPU acceleration. It supports both synchronous and asynchronous kernel launching through the `cuda-async` module, enabling composable GPU work patterns.
The project is in active development with an alpha status, meaning developers should expect bugs, incomplete features, and API changes. The workspace maintains continuous integration for both the core compiler and example compilation. A Discord community channel is available for user engagement and support.