Framework
salsa-rs/salsa avatar
salsa-rs/salsa

Twenty-eight minors in, and the package still calls itself experimental

A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.

3,038 stars231 forksRustApache-2.0

At a glance

What is it?
salsa is a Rust framework for on-demand incremental computation, the same idea behind the compiler query system it credits. It publishes three crates per release seconds apart, defaults to a feature literally named for unstable behaviour, compiles its tracing library in while leaving the spans out, and documents a manual release process in a tree that carries an automated one.
Who is it for?
salsa suits a Rust project with a build step or an analysis pass over a large graph of derived facts, where recomputing everything after each change is the bottleneck and the graph is pure enough to describe as queries. Three things to weigh before you commit.
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 received new commits within the last day.
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 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • salsa-rs/salsa3,038 ★ · +57
Star history
Repository2026-09-252026-11-23
salsa-rs/salsa3k3k

57 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The package description ends with the word experimental

The one-line summary in the manifest reads: a generic framework for on-demand, incrementalized computation, followed by the word experimental in parentheses.

That word has survived twenty-eight minor versions. The current release is 0.28.5, which means the project has been versioned as a zero-major API with a long history of breaking changes and deprecations, and its own metadata still describes it as experimental.

This is not a criticism so much as a reading instruction. A zero-major number tells you breaking changes are normal and a manifest that says experimental tells you the surface is still moving faster than the version number would suggest. The thing to plan for is not that the library might change but that it will change, and that the documentation and the examples in the repository are your fastest signal when it does.

Three crates, three tags, twenty-two seconds apart

salsa is not one crate. It is a workspace of three, and the release process publishes all of them together.

The three most recent tags make that visible. The macro-rules crate was published first, then the macros crate twelve seconds later, then the main crate another twelve seconds after that. Same version number in all three: 0.28.5, on the same day.

So a user who depends on the main crate transitively pulls two procedural macro crates pinned to exactly its version, and the manifest expresses that with the version written out by hand alongside a local path for each component. Nothing derives those three strings from one another.

The practical cost is in the release rhythm. A patch to the macro crate is not an independent release; it is a release of all three, because a user whose main crate and macros crate disagree on version will not build. For a project with a dozen or more maintainers willing to cut releases, that is a constraint, and it is why the release step is automated rather than manual.

The default feature set includes a feature named for unstable behaviour

Read the default feature list and the first entry is the one to think about. Defaults are a feature for this library's unstable surface, plus parallel execution, plus the macros, plus automatic ingredient registration, plus an accumulator.

So the default install is the experimental configuration, not a conservative one. That is a deliberate choice and it tells you where the project wants users, which is on the leading edge of its own API.

The rest of the feature list maps one to one onto optional dependencies, which makes the cost of each choice concrete. There is a feature for a parallel map that pulls in a work-stealing executor, a feature for automatic ingredient registration that pulls in a registration mechanism, a feature for persistence that pulls in two serialisation crates, a feature for supporting two compact string and pointer types as values, a feature for an ordering map, and one for a deterministic concurrency testing harness.

Six optional capabilities and one default that turns on the unstable surface. Read as a package, this is a library with a wide surface and a small core.

Tracing is always compiled in, and its spans are compiled out

There is a small detail in the dependency list that explains a lot about how the library is built.

The tracing library is not optional. It is a required dependency, configured without its default features and with only the standard library feature enabled. But there is a feature flag, disabled by default, whose comment says it enables the debugging and tracing events and spans.

So every user compiles the tracing crate, and almost none of them compile the code that emits into it. The instrumentation is behind a flag rather than behind the dependency, which means enabling it costs a rebuild rather than an extra crate in the tree, and it also means the crate you depend on is not the same as the code path that emits events.

The rest of the dependency list is a short catalogue of the data structures this kind of framework needs: two cache and set implementations with different growth and eviction behaviour, a concurrent queue, an arena, intrusive collections, two index and hash map types, a vector optimised for small element counts with a compile-time constructor, and portable atomics so the library builds for targets whose atomics are emulated.

The justfile checks for undefined behaviour and leaves concurrency out

The whole build interface is one file with three targets, and the choices inside it are the interesting part.

The first target runs the workspace tests with every target enabled and with fail-fast switched off, so one failing test does not hide the rest. The second runs the test suite under Miri on the nightly toolchain, which is an interpreter that checks for undefined behaviour rather than trusting the compiler. The third runs a parallel test through a different test runner with the concurrency-testing feature turned on.

So a library full of locks, caches and interior mutability is being checked by an undefined-behaviour interpreter and by a deterministic scheduler. That is more verification than most comparable crates arrange.

What the file does not do is wire those together. The combined target runs the first two and stops there, so the concurrency suite is opt-in even though it is the one that exercises the parallel path. The toolchain itself is pinned by a separate file at the root, and a dev container definition is committed alongside it.

Two licence files at the root and one name in the metadata

The root carries both an Apache licence file and an MIT licence file, side by side, and the manifest inherits its licence declaration from the workspace rather than stating it inline.

That is the standard arrangement for a dual-licensed library: you may take it under either. The published metadata names one of them, which is what package indexes and scanners will read.

It is a small asymmetry with a real consequence. A tool that reads metadata concludes the project is under the licence the metadata names, while a reader who opens the repository finds a second option the metadata never mentions. If you have a policy that treats the two licences differently, and they differ, then your automated answer and your legal answer can disagree.

The repository also carries a changelog, an editor configuration for Emacs committed at the root, and a frequent questions file. The editor configuration is the smallest of those signals and the most telling about who maintains it.

The README describes a manual release, and the tree carries a release bot

Here is a documentation-versus-repository mismatch that is easy to state and useful to know.

The contributing section explains the release process in two sentences: to create a release and publish, update the version field in the manifest, then push, after which GitHub Actions publishes the crates automatically. That is a manual version bump followed by an automated publish.

The repository root contains a configuration file for an automated release tool, and a configuration file for a dependency update bot. Neither is mentioned in the contributing section.

So one of two things is true, and the documentation does not distinguish them. Either the automated release tool is configured but not yet enabled, in which case the documented process is the live one and the configuration is leftover. Or it is enabled, in which case the documented process is stale and a maintainer following it would hand-edit a version string that the tool also writes.

Worth resolving before you script a release around either assumption.

Two example projects, and a book translated in another repository

The learning path offered here is three doors: heavily commented examples, a book, and videos. It is a generous front page for a library at this stage, and each door leads somewhere different.

The examples are two projects, not twenty. One is a calculator and one exercises lazy inputs. That is a deliberate minimum: one example per concept, each readable in full, rather than a gallery.

The book is the substantial surface, and its source lives in this repository, so the text is versioned alongside the code. The interesting detail is the translation: the Chinese edition is not in this repository and not in this organisation, but hosted from a separate translation project, and the README links it as a first-class alternative.

The credit list completes the picture of where the idea came from. The framework is described as heavily inspired by a research system on incremental computation, a JavaScript rendering engine, and the query system inside the Rust compiler, and four named researchers and authors are thanked by name. So the design lineage is documented rather than claimed, which is a good sign for a library whose whole premise is borrowing an algorithm.

Editorial conclusion

salsa suits a Rust project with a build step or an analysis pass over a large graph of derived facts, where recomputing everything after each change is the bottleneck and the graph is pure enough to describe as queries. Three things to weigh before you commit. The package describes itself as experimental and enables a feature named for unstable behaviour by default, so treat its API as a moving target regardless of the version number. Every release publishes three crates in lockstep, which means you inherit the macros crates at exactly the same version and a bump anywhere is a bump everywhere. And read the licence files yourself: there are two, and the published metadata names only one. For the concurrency path specifically, run the test suite the project provides rather than assuming the default target covers it, because it does not.

Frequently asked questions

What is the salsa Rust crate used for?

It is a generic framework for on-demand, incrementalized computation. You define a program as queries, each mapping a key type to a value type, in two varieties: inputs, which you can change whenever you like, and pure functions with no side effects. Results are memoized, and when inputs change the framework works out which memoized values can be reused.

Is salsa a stable crate?

Its own package description ends with the word experimental, at version 0.28.5, and its default feature set includes a feature named for unstable behaviour. It is also dual licensed, with an Apache licence file and an MIT licence file at the repository root, while the published metadata names only one of them.

Why does salsa publish three crates at once?

The workspace is split into the main crate, a macros crate and a macro-rules crate, and the release process publishes all three at the same version. The three most recent tags carry the same version number and were published seconds apart from each other on the same day.

How is a new version of salsa released?

The contributing section says to update the version field in Cargo.toml and push, after which GitHub Actions publishes the crates. The repository also contains a configuration file for an automated release tool and one for a dependency update bot, neither of which the documented process mentions.

How do you run the salsa test suite?

A justfile provides three targets: a workspace test run with all targets enabled and fail-fast disabled, a nightly Miri run for undefined behaviour checking, and a parallel test through another runner with the concurrency-testing feature enabled. The combined target runs the first two and not the concurrency suite.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. salsa-rs/salsa on GitHub
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.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/salsa-rs-salsa.svg)](https://hysenlabs.com/projects/salsa-rs-salsa)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/salsa-rs-salsa.svg)](https://hysenlabs.com/projects/salsa-rs-salsa)

Was this useful?