Urgent.News

What's breaking now, across thousands of outlets.

Tech

Nvidia Just Let Rust Into CUDA. Here's Why That's a Bigger Deal Than It Sounds

For twenty years, if you wanted a GPU kernel that actually ran fast on Nvidia hardware, you wrote CUDA C++. Rust could call into it through FFI, wrap it, bind it — but the kernel itself, the code that runs on the device, was C++'s territory. That's the whole reason unsafe shows up everywhere in Rust-on-GPU crates today: you're trusting a foreign toolchain you can't verify. That changed on…

Nvidia has opened its GPU kernel code to Rust, marking a significant shift in GPU programming. For two decades, CUDA C++ was the primary language for writing fast GPU kernels, with Rust calling into it via Foreign Function Interface (FFI). However, Nvidia's recent release of CUDA Rust introduces two open-source projects that compile Rust directly to PTX, bypassing the need for a wrapper or code generation. This development is a shot at one of tech's most critical moats.

Nvidia's strategy involves two tracks with distinct philosophies. cuda-oxide adopts the SIMT model, providing developers with explicit control over every thread. This track uses Rust's MIR (Mid-Level Intermediate Representation) to transform #[kernel] functions into PTX. The #[kernel] function vec_add demonstrates how Rust's borrow checker can catch GPU race conditions during compilation, preventing runtime issues.

On the other hand, cutile-rs focuses on a tile-based approach, where each tile block runs the kernel body once, removing the need for manual shared memory management and thread indexing. Cutile-rs is already in production use, integrated into Hugging Face's Grout inference engine and mistral.rs.

While both tracks are early alpha versions and not production-ready, they represent Nvidia's strategic move to widen the front door of GPU programming while maintaining the high walls of existing tooling. The CUDA moat, historically tied to C++, is now being widened to include memory-safe Rust. Nvidia plans to support interoperability between CUDA Rust, CUDA C++, and CUDA Python, ensuring that developers won't lose access to the existing ecosystem.

Despite its limitations, such as the need for pinned nightlies, rough compile times, and lack of portability to AMD or Intel GPUs, CUDA Rust can be a valuable tool for developers already invested in CUDA C++. It offers memory safety without sacrificing performance control, making it worth watching for those deeply involved in CUDA C++ development.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Conway's Law and Programming Languages

I was intrigued by Casey's comments on Conway's Law, and reading the original paper, Conway was mapping the relationship between information flow among designers and system structure.

More from Friday 18 September →