aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ARCHITECTURE.md26
1 files changed, 18 insertions, 8 deletions
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index f16ff782c..a6b1bf873 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -58,6 +58,14 @@ all `//test test_name` comments into files inside `tests/data` directory.
58See [#93](https://github.com/rust-analyzer/rust-analyzer/pull/93) for an example PR which 58See [#93](https://github.com/rust-analyzer/rust-analyzer/pull/93) for an example PR which
59fixes a bug in the grammar. 59fixes a bug in the grammar.
60 60
61### `crates/ra_hir`
62
63HIR (previsouly known as descriptors) provides a high-level OO acess to Rust
64code.
65
66The principal difference between HIR and syntax trees is that HIR is bound
67to a particular crate instance. That is, it has cfg flags and features
68applied. So, there relation between syntax and HIR is many-to-one.
61 69
62### `crates/ra_editor` 70### `crates/ra_editor`
63 71
@@ -72,13 +80,6 @@ syntax tree as an input.
72The tests for `ra_editor` are `#[cfg(test)] mod tests` unit-tests spread 80The tests for `ra_editor` are `#[cfg(test)] mod tests` unit-tests spread
73throughout its modules. 81throughout its modules.
74 82
75### `crates/salsa`
76
77An implementation of red-green incremental compilation algorithm from
78rust compiler. It makes all rust-analyzer features on-demand. To be replaced
79with `salsa-rs/salsa` soon.
80
81
82### `crates/ra_analysis` 83### `crates/ra_analysis`
83 84
84A stateful library for analyzing many Rust files as they change. 85A stateful library for analyzing many Rust files as they change.
@@ -87,6 +88,8 @@ current state, incorporates changes and handles out `Analysis` --- an
87immutable consistent snapshot of world state at a point in time, which 88immutable consistent snapshot of world state at a point in time, which
88actually powers analysis. 89actually powers analysis.
89 90
91### `crates/ra_db`
92This defines basic database traits. Concrete DB is defined by ra_analysis.
90 93
91### `crates/ra_lsp_server` 94### `crates/ra_lsp_server`
92 95
@@ -97,8 +100,15 @@ See [#79](https://github.com/rust-analyzer/rust-analyzer/pull/79/) as an
97example of PR which adds a new feature to `ra_editor` and exposes it 100example of PR which adds a new feature to `ra_editor` and exposes it
98to `ra_lsp_server`. 101to `ra_lsp_server`.
99 102
103### `crates/gen_lsp_server`
104
105A language server scaffold, exposing a synchronous crossbeam-channel based API.
106This crate handles protocol handshaking and parsing messages, while you
107control the message dispatch loop yourself.
108
109Run with `RUST_LOG=sync_lsp_server=debug` to see all the messages.
100 110
101### `crates/cli` 111### `crates/ra_cli`
102 112
103A CLI interface to rust-analyzer. 113A CLI interface to rust-analyzer.
104 114