rust-gpu builds from main and promises no compatibility
🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧
At a glance
- What is it?
- rust-gpu is a Rust compiler backend that emits SPIR-V, plus the standard library and builder crates GPU code needs. Its own workspace manifest excludes one crate over a lock file version its toolchain cannot read, and it documents a shader example that stops mid statement.
- Who is it for?
- rust-gpu suits someone who wants to write shader code in Rust today and accepts rebuilding from the default branch when the compiler changes underneath them. It does not suit a product with a maintenance window, because the project states it makes no backwards compatibility guarantees and has no deprecation model.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 21, 2026, and from our analysis. They are not legal advice.
Star history
- Rust-GPU/rust-gpu3,455 ★ · +82
| Repository | 2026-09-24 | 2026-11-21 |
|---|---|---|
| Rust-GPU/rust-gpu | 3.4k | 3.5k |
82 Stars in the last 58 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Technically usable, explicitly not production ready
The status section is unusually direct. The project is described as heavily in development and at an early stage. Compiling and running simple shaders works, and a significant portion of the core library also compiles, with the word also doing a lot of work in that sentence. Then the admission: many things are not implemented yet, so while being technically usable the project is not yet production-ready. The compatibility section repeats the point in policy form. Because it is early, temporary changes may be introduced as stop-gap measures, there are no guarantees about backwards compatibility, there is no formal deprecation model, and the only supported way to build is from source against the latest default branch. Adopters are asked to evolve their code alongside the project's.
It plugs in as a compiler backend
The mechanism is the standard one for replacing a Rust compiler's code generation. The backend is selected with the unstable codegen backend flag, which is the same hook that other alternative backends use, including the one that targets the same intermediate representation as GCC and the one named after a compiler backend for another language. Only one output is planned today: SPIR-V, described as Vulkan's open compiler target. Two more are named as possibilities for a later version, DXIL for the DirectX target and WGSL, the WebGPU shading language, which the file notes is bijective with SPIR-V. The second half of the project's scope is the packaging story, support for the Rust package manager and the package registry so that SPIR-V crates can be developed and published like any other.
Why the existing languages are still in place
The background section explains the problem the project is attacking rather than praising its own solution. GPU programming has historically been done in one shading language, or to a lesser extent two others, and those languages are simple ones that evolved alongside rendering APIs. Their stated failure is not expressiveness but scale: they have no mechanisms for dealing with large codebases and have generally fallen behind other languages. Two reasons are given, one structural and one economic, that it is a niche language for a niche market, and that the industry has invested heavily in the status quo. Better alternatives exist, the file concedes, but none is positioned to replace the two dominant ones, either because they are vendor locked or because they do not support the traditional graphics pipeline.
One company started it and still holds a copyright line
The project was originally created and supported by Embark, and the README thanks them for foresight and contributions before listing what Embark wanted from it: one language internally instead of several, an open source graphics ecosystem, easier code sharing between GPU and CPU, and faster work for their own users and for other developers. That origin is still visible in the workspace manifest, whose authors field lists the project's developers and Embark together with a contact address. It is visible in the licensing too, and here the sources disagree in a small way: the manifest offers the code under a dual MIT or Apache 2.0 licence with both licence texts at the repository root, while the repository's own licence metadata records Apache 2.0 alone.
One crate excluded over a lock file version
The workspace manifest excludes exactly one member, and the comment above it explains why in more detail than most projects give:
exclude = [
# This currently needs to be excluded because it depends on a version of `rust-gpu` that
# uses a toolchain whose Cargo version doesn't recognise version 4 of `Cargo.lock`.
"crates/shader-crate-template",
# Testing infra may copy the `shader-crate-template` into subdirs of target
"target",
]So the crate that exists to be a starting point for new shader projects cannot be built as part of the workspace, because it pins an older release whose toolchain cannot parse the current lock file format. The second entry excludes the build output directory, with the note that testing infrastructure copies that template into subdirectories of it.
Shaders are tested three ways
Three runner packages are workspace members, and their names tell you the execution paths the project supports: one that runs on the CPU, one built on a low level graphics binding, and one built on a higher level abstraction with a second crate for its builder. Alongside them sit two test harnesses with their own helper crates, one for compile tests and one for diff tests, the latter split into a binary, a runner and a shared types crate. Diff testing is the interesting one for a compiler: it means output is compared against expected output rather than merely compiled. The example shaders are members too, five of them, including one that reduces values, one that draws a sky, one compute shader and one that reads the mouse.
A custom target architecture needs a lint carve-out
The manifest contains one configuration line that only makes sense for this project. The workspace lint configuration sets the unexpected configuration flags check to allow, and gives the one allowed value: a target architecture named spirv. Since that architecture does not exist in any released Rust toolchain, every conditional compilation guard on it would otherwise be reported as a mistake, so the check is told to expect exactly that one value and nothing else. Elsewhere the manifest pins the edition, sets one version for the whole workspace, and points at the repository. The toolchain itself is pinned by a separate file at the root, which is what makes a from-source build reproducible at all.
Nix files, a licence checker and release automation
The root of the repository is a Rust workspace with the usual project files and four that are less usual. There is a Nix file for a Unix development shell and a second one for Android, which suggests the project is built or tested on a mobile target somewhere in its process. There is a configuration file for a dependency licence checker, which is how a project with a dual licence keeps third party terms honest. And there is a configuration file for a release tool, alongside a changelog, a code of conduct and a contributing guide. The release history shows two tags in 2026: an alpha in April and the stable 0.10.0 in October, published the day before the last commit on the default branch.
Editorial conclusion
rust-gpu suits someone who wants to write shader code in Rust today and accepts rebuilding from the default branch when the compiler changes underneath them. It does not suit a product with a maintenance window, because the project states it makes no backwards compatibility guarantees and has no deprecation model. Before committing, check four things: whether your target is Vulkan, since SPIR-V is the only planned output and other targets are named as possibilities, whether you can live with the SPIR-V dialect differences the project's own related-work section warns about, whether you have the toolchain to build from source, since that is the only supported path, and whether the standard library covers the parts of it you need, since the README says a significant portion compiles and stops there.
Frequently asked questions
What is rust-gpu?
A project to make Rust a first-class language for GPU graphics and compute shaders, built as a compiler backend that emits SPIR-V together with the standard library and builder crates that GPU crates need.
Is rust-gpu production-ready?
Its own README says no. The project is described as heavily in development with many things unimplemented, technically usable but not production-ready, making no backwards compatibility guarantees, and supporting only builds from source against the latest default branch.
What output format does rust-gpu generate?
SPIR-V, described as Vulkan's open compiler target, produced through a backend plugged into the Rust compiler with the codegen backend flag. DXIL for DirectX and WGSL for the web are named as possible future targets rather than current ones.
Which crates make up rust-gpu?
A compiler backend crate, a standard library crate for GPU intrinsics and types, a builder crate for compiling a GPU crate from a host build script, and two cargo subcommands, inside a workspace that also holds runners, example shaders and two test harnesses.
Why is one crate excluded from the rust-gpu workspace?
The manifest explains that the shader crate template depends on a rust-gpu version whose toolchain ships a Cargo that does not recognise version 4 of the lock file format, so it is excluded along with the build output directory that testing copies into.
Who started rust-gpu?
It was originally created and supported by Embark, who wanted a single language internally and an open source graphics ecosystem with easier code sharing between GPU and CPU. The workspace manifest still lists the project's developers and Embark as authors.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rust-gpu-rust-gpu)Star history chart for your README
[](https://hysenlabs.com/projects/rust-gpu-rust-gpu)Was this useful?