aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/architecture.md')
-rw-r--r--docs/dev/architecture.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 6fd396dee..629645757 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -106,7 +106,7 @@ guessing a HIR for a particular source position.
106 106
107Underneath, HIR works on top of salsa, using a `HirDatabase` trait. 107Underneath, HIR works on top of salsa, using a `HirDatabase` trait.
108 108
109### `crates/ra_ide_api` 109### `crates/ra_ide`
110 110
111A stateful library for analyzing many Rust files as they change. `AnalysisHost` 111A stateful library for analyzing many Rust files as they change. `AnalysisHost`
112is a mutable entity (clojure's atom) which holds the current state, incorporates 112is a mutable entity (clojure's atom) which holds the current state, incorporates
@@ -124,11 +124,11 @@ offsets and strings as output. This works on top of rich code model powered by
124 124
125### `crates/ra_lsp_server` 125### `crates/ra_lsp_server`
126 126
127An LSP implementation which wraps `ra_ide_api` into a language server protocol. 127An LSP implementation which wraps `ra_ide` into a language server protocol.
128 128
129### `ra_vfs` 129### `ra_vfs`
130 130
131Although `hir` and `ra_ide_api` don't do any IO, we need to be able to read 131Although `hir` and `ra_ide` don't do any IO, we need to be able to read
132files from disk at the end of the day. This is what `ra_vfs` does. It also 132files from disk at the end of the day. This is what `ra_vfs` does. It also
133manages overlays: "dirty" files in the editor, whose "true" contents is 133manages overlays: "dirty" files in the editor, whose "true" contents is
134different from data on disk. This is more or less the single really 134different from data on disk. This is more or less the single really
@@ -162,13 +162,13 @@ disk. For this reason, we try to avoid writing too many tests on this boundary:
162in a statically typed language, it's hard to make an error in the protocol 162in a statically typed language, it's hard to make an error in the protocol
163itself if messages are themselves typed. 163itself if messages are themselves typed.
164 164
165The middle, and most important, boundary is `ra_ide_api`. Unlike 165The middle, and most important, boundary is `ra_ide`. Unlike
166`ra_lsp_server`, which exposes API, `ide_api` uses Rust API and is intended to 166`ra_lsp_server`, which exposes API, `ide` uses Rust API and is intended to
167use by various tools. Typical test creates an `AnalysisHost`, calls some 167use by various tools. Typical test creates an `AnalysisHost`, calls some
168`Analysis` functions and compares the results against expectation. 168`Analysis` functions and compares the results against expectation.
169 169
170The innermost and most elaborate boundary is `hir`. It has a much richer 170The innermost and most elaborate boundary is `hir`. It has a much richer
171vocabulary of types than `ide_api`, but the basic testing setup is the same: we 171vocabulary of types than `ide`, but the basic testing setup is the same: we
172create a database, run some queries, assert result. 172create a database, run some queries, assert result.
173 173
174For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for 174For comparisons, we use [insta](https://github.com/mitsuhiko/insta/) library for