Nvidia opens CUDA GPU kernels to native Rust programming
The company introduced two separate toolchains, cuda-oxide and cutile-rs, that let engineers write GPU kernels in Rust instead of CUDA's C++ or Python interfaces, with plans to let all three languages interoperate.
Nvidia introduced two new ways to write GPU kernels, the small programs that run directly on a graphics processor, in Rust rather than CUDA’s usual C++ or Python interfaces. The company detailed the tools in a blog post this week, describing them as two separate tracks built for different kinds of Rust programmers.
The first, called cuda-oxide, is a custom compiler backend for Rust. It intercepts code marked with a #[kernel] attribute, routes it through Rust’s internal representation and the community-built Pliron IR framework, then hands it to LLVM, the compiler toolkit that turns it into PTX, Nvidia’s low-level GPU instruction format. This track follows CUDA C++‘s SIMT model, short for single-instruction, multiple-thread, where a programmer writes what one thread does and launches thousands of copies at once. cuda-oxide requires a pinned nightly build of the Rust compiler plus a working LLVM installation, and Nvidia describes the project as being in early alpha, meaning it is not yet considered stable.
The second tool, cutile-rs, works at a higher level Nvidia calls Tile, where a programmer describes what happens to one block of data and the compiler decides how to spread that work across GPU threads. It runs on stable Rust 1.89 or newer with CUDA 13.3, needs no custom LLVM build, and is already published on the Rust package registry crates.io. According to Nvidia, cutile-rs is already used inside HuggingFace’s Grout inference engine and in mistral.rs.
Both tools lean on Rust’s compile-time checks to catch memory errors before code runs on a GPU. cuda-oxide uses a type called DisjointSlice, paired with launch contracts that check a kernel’s launch settings against declared limits, to stop multiple threads from writing to the same memory location by accident. cutile-rs reaches a similar guarantee through tensor partitioning, which gives each block of the computation an exclusive, non-overlapping section of data before the kernel runs.
Part of a broader Rust push
Nvidia frames the release as part of a longer shift already under way inside the company. Its Nova Linux driver is written in Rust, its Dynamo software has a Rust core, and NVTX has Rust bindings. Until now, the GPU kernel itself was the one piece developers usually still had to write in another language, even when calling it from Rust. Nvidia says CUDA C++ and CUDA Python remain its mature, enterprise-grade toolchains, and that it plans to keep developing CUDA Rust through 2027 and beyond.
The company also says it plans to let CUDA Rust, CUDA C++ and CUDA Python work together, so a project split across those languages would not need to standardize on one of them. Nvidia has not given a timeline for that interoperability, or for when cuda-oxide might leave alpha status. Developers can already try cutile-rs through its crates.io package, or test cuda-oxide by installing its pinned nightly toolchain and running its scaffolding tool.
Sources
- Nvidia announces native GPU programming in Rust Hacker News
AI-generated · AIVIO News Desk