diff options
Diffstat (limited to 'docs/dev/architecture.md')
-rw-r--r-- | docs/dev/architecture.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 9e21d7c83..2ba8b7967 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -164,7 +164,7 @@ These crates also define various intermediate representations of the core. | |||
164 | 164 | ||
165 | **Architecture Invariant:** these crates explicitly care about being incremental. | 165 | **Architecture Invariant:** these crates explicitly care about being incremental. |
166 | The core invariant we maintain is "typing inside a function's body never invalidates global derived data". | 166 | The core invariant we maintain is "typing inside a function's body never invalidates global derived data". |
167 | IE, if you change the body of `foo`, all facts about `bar` should remain intact. | 167 | i.e., if you change the body of `foo`, all facts about `bar` should remain intact. |
168 | 168 | ||
169 | **Architecture Invariant:** hir exists only in context of particular crate instance with specific CFG flags. | 169 | **Architecture Invariant:** hir exists only in context of particular crate instance with specific CFG flags. |
170 | The same syntax may produce several instances of HIR if the crate participates in the crate graph more than once. | 170 | The same syntax may produce several instances of HIR if the crate participates in the crate graph more than once. |
@@ -232,7 +232,7 @@ All other requests are processed in background. | |||
232 | 232 | ||
233 | **Architecture Invariant:** the server is stateless, a-la HTTP. | 233 | **Architecture Invariant:** the server is stateless, a-la HTTP. |
234 | Sometimes state needs to be preserved between requests. | 234 | Sometimes state needs to be preserved between requests. |
235 | For example, "what is the `edit` for the fifth's completion item of the last completion edit?". | 235 | For example, "what is the `edit` for the fifth completion item of the last completion edit?". |
236 | For this, the second request should include enough info to re-create the context from scratch. | 236 | For this, the second request should include enough info to re-create the context from scratch. |
237 | This generally means including all the parameters of the original request. | 237 | This generally means including all the parameters of the original request. |
238 | 238 | ||
@@ -249,7 +249,7 @@ These crates deal with invoking `cargo` to learn about project structure and get | |||
249 | They use `crates/path` heavily instead of `std::path`. | 249 | They use `crates/path` heavily instead of `std::path`. |
250 | A single `rust-analyzer` process can serve many projects, so it is important that server's current directory does not leak. | 250 | A single `rust-analyzer` process can serve many projects, so it is important that server's current directory does not leak. |
251 | 251 | ||
252 | ### `crates/mbe`, `crated/tt`, `crates/proc_macro_api`, `crates/proc_macro_srv` | 252 | ### `crates/mbe`, `crates/tt`, `crates/proc_macro_api`, `crates/proc_macro_srv` |
253 | 253 | ||
254 | These crates implement macros as token tree -> token tree transforms. | 254 | These crates implement macros as token tree -> token tree transforms. |
255 | They are independent from the rest of the code. | 255 | They are independent from the rest of the code. |
@@ -264,7 +264,7 @@ These crates implement a virtual file system. | |||
264 | They provide consistent snapshots of the underlying file system and insulate messy OS paths. | 264 | They provide consistent snapshots of the underlying file system and insulate messy OS paths. |
265 | 265 | ||
266 | **Architecture Invariant:** vfs doesn't assume a single unified file system. | 266 | **Architecture Invariant:** vfs doesn't assume a single unified file system. |
267 | IE, a single rust-analyzer process can act as a remote server for two different machines, where the same `/tmp/foo.rs` path points to different files. | 267 | i.e., a single rust-analyzer process can act as a remote server for two different machines, where the same `/tmp/foo.rs` path points to different files. |
268 | For this reason, all path APIs generally take some existing path as a "file system witness". | 268 | For this reason, all path APIs generally take some existing path as a "file system witness". |
269 | 269 | ||
270 | ### `crates/stdx` | 270 | ### `crates/stdx` |