A Python-embedded programming language that JIT-compiles numerical kernels to run on CPUs and GPUs such as CUDA, Vulkan and Metal.
NVIDIA/cuda-rust
NVIDIA's Rust platform for CUDA, with host runtime crates plus SIMT and Tile models for writing GPU kernels in Rust.
- Stars
- 4,007
- Forks
- 364
- Open issues
- 234
- Last commit
- 15 hours ago
What is it?
CUDA Rust gives Rust developers a way to drive NVIDIA GPUs. It includes host-side crates for the CUDA driver API, covering contexts, streams, device buffers, events and lazy, composable async operations, along with two device-side kernel programming models.
The cuda-oxide component targets the traditional SIMT model, where you write per-thread code and manage threads, blocks and shared memory yourself. It is built as a custom rustc codegen backend that compiles Rust ahead of time to PTX. The cutile-rs component targets the Tile model, where kernels operate on whole tiles of multi-dimensional tensors and the compiler handles mapping work onto each architecture. It is a proc-macro plugin that JIT-compiles on first launch.
Both models extend Rust's ownership rules across the GPU launch boundary: mutable buffers are partitioned into disjoint pieces before launch, and immutable buffers are shared. The project is described as early-stage research, so expect incomplete features and API changes.
Key features
- 01Host-side driver bindings, contexts, streams, device buffers and events in Rust.
- 02SIMT kernel model with explicit thread and block indices, compiled ahead of time to PTX.
- 03Tile kernel model that operates on tensor tiles and is JIT-compiled at first launch.
- 04Ownership-style borrow rules applied to device buffers across kernel launches.
- 05Kernels from both models can run on the same stream over shared device buffers.
Use cases
- Writing custom GPU kernels in Rust when you need fine control over threads, warps and shared memory.
- Expressing dense tensor or numerical workloads as tile operations and letting the compiler handle scheduling.
- Building async GPU pipelines with composable device operations on top of the shared runtime crates.
In collections
Topics
FAQ
- What is cuda-rust?
- NVIDIA's Rust platform for CUDA, with host runtime crates plus SIMT and Tile models for writing GPU kernels in Rust. CUDA Rust gives Rust developers a way to drive NVIDIA GPUs. It includes host-side crates for the CUDA driver API, covering contexts, streams, device buffers, events and lazy, composable async operations, along with two device-side kernel programming models.
- Is cuda-rust free to use? What license does it have?
- cuda-rust is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is cuda-rust still maintained?
- Actively maintained. The last commit to cuda-rust was on Nov 7, 2026.
- What can I use cuda-rust for?
- Writing custom GPU kernels in Rust when you need fine control over threads, warps and shared memory. Expressing dense tensor or numerical workloads as tile operations and letting the compiler handle scheduling. Building async GPU pipelines with composable device operations on top of the shared runtime crates.
- Where can I get cuda-rust?
- The source code and installation instructions are on GitHub: https://github.com/NVIDIA/cuda-rust
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A header-only C++ library for writing task-parallel programs using task graphs, with CPU multithreading and CUDA GPU support.
A Python profiler that reports CPU, GPU, and memory usage per line, with optional AI-generated optimization suggestions.
A C++ LLM inference server for consumer GPUs and mixed AMD/NVIDIA machines, using speculative decoding, speculative prefill and custom kernels.
NumPy/SciPy-compatible array library that runs existing Python array code on NVIDIA CUDA or AMD ROCm GPUs.
CUDA C++ template library and Python DSL for writing high-performance GEMM and related linear algebra kernels on NVIDIA GPUs.