mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-08 21:35:47 +00:00
commit
b3d3e8f944
4 changed files with 7 additions and 8 deletions
6
FAQ.md
6
FAQ.md
|
@ -18,15 +18,15 @@ revision counters from Glimmer, instead), I still like the name.
|
||||||
|
|
||||||
You may have noticed that Salsa "feels" a lot like an ECS in some
|
You may have noticed that Salsa "feels" a lot like an ECS in some
|
||||||
ways. That's true -- Salsa's queries are a bit like *components* (and
|
ways. That's true -- Salsa's queries are a bit like *components* (and
|
||||||
the keys to the queries are a bit like *entitites*). But there is one
|
the keys to the queries are a bit like *entities*). But there is one
|
||||||
big difference: **ECS is -- at its heart -- a mutable system**. You
|
big difference: **ECS is -- at its heart -- a mutable system**. You
|
||||||
can get or set a component of some entity whenever you like. In
|
can get or set a component of some entity whenever you like. In
|
||||||
contrast, salsa's queries define **define "derived values" via pure
|
contrast, salsa's queries **define "derived values" via pure
|
||||||
computations**.
|
computations**.
|
||||||
|
|
||||||
Partly as a consequence, ECS doesn't handle incremental updates for
|
Partly as a consequence, ECS doesn't handle incremental updates for
|
||||||
you. When you update some component of some entity, you have to ensure
|
you. When you update some component of some entity, you have to ensure
|
||||||
that other entities' components are upated appropriately.
|
that other entities' components are updated appropriately.
|
||||||
|
|
||||||
Finally, ECS offers interesting metadata and "aspect-like" facilities,
|
Finally, ECS offers interesting metadata and "aspect-like" facilities,
|
||||||
such as iterating over all entities that share certain components.
|
such as iterating over all entities that share certain components.
|
||||||
|
|
|
@ -7,9 +7,8 @@ on the the incremental recompilation techniques that we built for
|
||||||
rustc, and many (but not all) of its users are building compilers or
|
rustc, and many (but not all) of its users are building compilers or
|
||||||
other similar tooling.
|
other similar tooling.
|
||||||
|
|
||||||
If you'd like to learn more about Salsa, you can check out [the [Hello
|
If you'd like to learn more about Salsa, you can check out the
|
||||||
World
|
[Hello World example](https://github.com/salsa-rs/salsa/blob/master/examples/hello_world/main.rs)
|
||||||
example](https://github.com/salsa-rs/salsa/blob/master/examples/hello_world/main.rs)
|
|
||||||
in the repository, or watch some of our [YouTube videos](./videos.md).
|
in the repository, or watch some of our [YouTube videos](./videos.md).
|
||||||
|
|
||||||
If you'd like to chat about Salsa, or you think you might like to
|
If you'd like to chat about Salsa, or you think you might like to
|
||||||
|
|
|
@ -7,7 +7,7 @@ use std::sync::Arc;
|
||||||
// functions) that are defined in one particular spot. Each query
|
// functions) that are defined in one particular spot. Each query
|
||||||
// group is defined by a trait decorated with the
|
// group is defined by a trait decorated with the
|
||||||
// `#[salsa::query_group]` attribute. The trait defines one method per
|
// `#[salsa::query_group]` attribute. The trait defines one method per
|
||||||
// query, with the argments to the method being the query **keys** and
|
// query, with the arguments to the method being the query **keys** and
|
||||||
// the return value being the query's **value**.
|
// the return value being the query's **value**.
|
||||||
//
|
//
|
||||||
// Along with the trait, each query group has an associated
|
// Along with the trait, each query group has an associated
|
||||||
|
|
|
@ -417,7 +417,7 @@ where
|
||||||
debug!("sweep({:?}): in-progress", self);
|
debug!("sweep({:?}): in-progress", self);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, drop only value or the whole memo accoring to the
|
// Otherwise, drop only value or the whole memo according to the
|
||||||
// strategy.
|
// strategy.
|
||||||
QueryState::Memoized(memo) => {
|
QueryState::Memoized(memo) => {
|
||||||
debug!(
|
debug!(
|
||||||
|
|
Loading…
Reference in a new issue