DioxusLabs / rustd
git clone https://github.com/DioxusLabs/rustd.git
a rust compiler daemon for up to 25x faster cargo builds
+9
stars, 24h · #1,538
+~63
stars, 7 days · #1,960
+~270
stars, 30 days · #1,902
139
★ total · +63% this week
8
forks · 15 open issues
Star history (as recorded here)
LanguageRust
LicenseApache-2.0
Created2026-09-12 (1mo ago)
Last pushtoday
Watchers1
OwnerOrganization
Links
- GitHub: github.com/DioxusLabs/rustd
- Homepage: https://dioxuslabs.github.io/rustd/
- Releases · Issues · Hacker News mentions
README excerpt
# rustd rustd is a Rust compiler daemon. One process per user stays running, keeps rust-analyzer's analysis of your workspaces in memory and, when given a directory, compiled functions in a store on disk, and answers builds from that state. After an edit it compiles the functions that changed, with Cranelift or LLVM, and either links them in front of what rustc built or splices them into the executable that is already there. cargo and rustc start from the file system on every build: they parse, resolve, type-check and generate code for a whole crate again when one function in it changed, and a second checkout of the same repository starts from nothing. rustd keeps that work. Git worktrees of one repository share one database, and a function compiled once is found again by the hash of what it was compiled from, in any workspace on the machine or, through an S3 bucket, on another machine. It is meant for people and coding agents who build the same code many times, often in several worktrees at once. ## Status This is a prototype, published for the first time. Nobody outside the project has used it. Read this section before relying on it. - It was written largely with AI assistance under human direction. What stands behind it is the testing: every change is judged by comparing rustd's output with rustc's (docs/harness.md). - rustc is still required. It builds the crates the workspace depends on, through cargo, so the usual caches of those (sccache, a CI cache) still apply. The workspace's own crates are rustd's from the first build on, except build scripts, proc-macro crates and what those depend on, which run inside cargo and rustc. rustd does not produce `.rlib` or `.rmeta` files. - Once the daemon has a workspace, rustc does not run on an edit at all: no `cargo check` beside the build, so nothing competes with it for the CPU. The price is diagnostics. rustd refuses source in which rust-analyzer finds a type or name error, and says each as `path:line:column: message [E0308]`; the wording is rust-analyzer's, not rustc's. It has no borrow checker: a use after a move, a missing `mut` or a reference that outlives its value is built and run. `cargo rustd check` is `cargo check` and gives rustc's verdict. - It never falls back. A function the daemon cannot compile fails the build with the function and the reason, and so does a command it does not build, such as `cargo rustd test` today: see What is not supported. No build of the workspace is handed to cargo. - It is pinned to one toolchain, Rust 1.99.0. It links against rustc's output, so it has to agree with that rustc on symbol names, type layout and the unstable Rust ABI. - `cargo rustd` builds programs on Linux (ELF) and on macOS arm64 (Mach-O), in any profile and with `RUSTFLAGS`; other targets fail the build. On macOS it has been run on ripgrep, fd and hyperfine only. The command has not been built or run on Windows; the daemon underneath it has, through the harnesses. - The code