A generic framework for on-demand, incrementalized computation. Inspired by adapton, glimmer, and rustc's query system.
Find a file
Niko Matsakis 5472cfdbc8 simplify the logic by using changed_at and not verified_at
I think they are actually equivalent, as we have already fond that the
inputs did not change in the range `changed_at..=verified_at`.
2018-10-01 13:20:18 -04:00
examples/hello_world rename from of to get and use read in tests 2018-09-30 10:59:08 -04:00
src simplify the logic by using changed_at and not verified_at 2018-10-01 13:20:18 -04:00
tests add support for "dependency only" tracking 2018-10-01 08:40:15 -04:00
.dir-locals.el ask emacs to rustfmt on save 2018-09-28 11:26:57 -04:00
.gitignore warn people not to use this :) 2018-09-29 06:05:04 -04:00
.travis.yml add travis.yml support 2018-09-30 07:39:52 -04:00
Cargo.toml bump to v0.2.0 2018-10-01 09:09:13 -04:00
LICENSE-APACHE add readme, license, etc 2018-09-28 11:01:27 -04:00
LICENSE-MIT add readme, license, etc 2018-09-28 11:01:27 -04:00
README.md bump to v0.2.0 2018-10-01 09:09:13 -04:00

salsa

A generic framework for on-demand, incrementalized computation.

Obligatory warning

Very much a WORK IN PROGRESS at this point. Ready for experimental use but expect frequent breaking changes.

Credits

This system is heavily inspired by adapton, glimmer, and rustc's query system. So credit goes to Eduard-Mihai Burtescu, Matthew Hammer, Yehuda Katz, and Michael Woerister.

Goals

It tries to hit a few goals:

  • No need for a base crate that declares the "complete set of queries"
  • Each query can define its own storage and doesn't have to be memoized
  • Each module only has to know about the queries that it depends on and that it provides (but no others)
  • Compiles to fast code, with no allocation, dynamic dispatch, etc on the "memoized hit" fast path
  • Can recover from cycles gracefully (though I didn't really show that)
  • Should support arenas and other lifetime-based things without requiring lifetimes everywhere when you're not using them (untested)

Example

There is a working hello_world example which is probably the best documentation. More to come when I expand out a few more patterns.