<aside> 💡
Incremental computation means reusing whatever parts of the previous run are still valid. Doing that purely in memory is fairly well understood; Salsa and rust-analyzer are the standard examples. The hard part is putting the dependency graph and results on disk so the reuse survives a process restart. That takes three things: (1) "stable IDs" that mean the same thing across sessions, (2) comparing "fingerprints" instead of the values themselves, and (3) a design that treats the cache as something you can throw away when it's broken.
</aside>
On 2026-11-19, "Persistent incrementality in Rust" picked up discussion on Lobsters. The post is dated 11-06 and comes from the author of Rust Glancer, a lightweight Rust language server. In short:
The same problem is surfacing in other places at the same time:
cargo check → cargo build → cargo test rebuilds the workspace each time, even though the three share a lot of meaning. The goal is a redesign that lets different compiler invocations share incremental state (contact: Alejandra González; partly funded by AWS).next dev stable and on by default. It persists the dependency graph, the aggregation graph, and all intermediate results to disk, so a restart resumes from a warm cache. Vercel says this took "over a year of dedicated work."So the open question isn't whether incremental computation pays off. It's how to make incremental state outlive the process. That design question applies whether you're writing a language server, a compiler, or a bundler.
Take the post's toy example. word_count(file) counts the words in a file, and files can include other files. is_haha_number(file) returns true if that count is 67, 69, or 420.
A naive implementation recounts everything whenever any file changes. Incremental computation wants three things:
is_haha_number(a) is still true, so nothing downstream should rerun.In memory, these three are solved fairly cleanly. Once you close and reopen the editor, or run cargo build as a separate process, several new problems appear at once:
FileId(3), or rustc's DefId) has no guarantee of meaning the same thing in this one.