C++Rust Systems ProgrammingGraphics Programming 1 min read

NVIDIA Introduces Official Support for Writing CUDA Kernels in Rust

NVIDIA has unveiled two new workflows for developing GPU-accelerated applications using Rust, offering both a standard library-like interface and interoperability with existing C++ CUDA codebases.

NVIDIA introduced support for writing CUDA kernels using Rust. You get two distinct approaches for GPU-accelerated workflows.

The first track uses the cuda_std crate. This gives you a standard library-like interface for GPU device code. You can write kernel code using familiar abstractions that remain compatible with the CUDA execution model.

The second track uses the nvcc compiler combined with the bindgen tool. This strategy focuses on interoperability. You can call Rust-written device functions from host-side C++ code, or do the exact opposite. This method supports hybrid codebases and incremental migration of legacy kernels.

Both methods rely on the LLVM-based Rust compiler to generate PTX code for execution on NVIDIA GPUs. Documentation and example repositories are available now to show you how to set up toolchains, manage dependencies, and compile kernels.