Skip to content

Commit f655f99

Browse files
bors[bot]h-michael
andcommitted
Merge #275
275: Update ARCHITECTURE.md r=matklad a=h-michael I am still not familiar with the code base, so mostly I quote crate's comments. Co-authored-by: Hirokazu Hata <[email protected]>
2 parents 038ae23 + 6d14bb0 commit f655f99

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

ARCHITECTURE.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ all `//test test_name` comments into files inside `tests/data` directory.
5858
See [#93](https://github.com/rust-analyzer/rust-analyzer/pull/93) for an example PR which
5959
fixes a bug in the grammar.
6060

61+
### `crates/ra_hir`
62+
63+
HIR (previsouly known as descriptors) provides a high-level OO acess to Rust
64+
code.
65+
66+
The principal difference between HIR and syntax trees is that HIR is bound
67+
to a particular crate instance. That is, it has cfg flags and features
68+
applied. So, there relation between syntax and HIR is many-to-one.
6169

6270
### `crates/ra_editor`
6371

@@ -72,13 +80,6 @@ syntax tree as an input.
7280
The tests for `ra_editor` are `#[cfg(test)] mod tests` unit-tests spread
7381
throughout its modules.
7482

75-
### `crates/salsa`
76-
77-
An implementation of red-green incremental compilation algorithm from
78-
rust compiler. It makes all rust-analyzer features on-demand. To be replaced
79-
with `salsa-rs/salsa` soon.
80-
81-
8283
### `crates/ra_analysis`
8384

8485
A stateful library for analyzing many Rust files as they change.
@@ -87,6 +88,8 @@ current state, incorporates changes and handles out `Analysis` --- an
8788
immutable consistent snapshot of world state at a point in time, which
8889
actually powers analysis.
8990

91+
### `crates/ra_db`
92+
This defines basic database traits. Concrete DB is defined by ra_analysis.
9093

9194
### `crates/ra_lsp_server`
9295

@@ -97,8 +100,15 @@ See [#79](https://github.com/rust-analyzer/rust-analyzer/pull/79/) as an
97100
example of PR which adds a new feature to `ra_editor` and exposes it
98101
to `ra_lsp_server`.
99102

103+
### `crates/gen_lsp_server`
104+
105+
A language server scaffold, exposing a synchronous crossbeam-channel based API.
106+
This crate handles protocol handshaking and parsing messages, while you
107+
control the message dispatch loop yourself.
108+
109+
Run with `RUST_LOG=sync_lsp_server=debug` to see all the messages.
100110

101-
### `crates/cli`
111+
### `crates/ra_cli`
102112

103113
A CLI interface to rust-analyzer.
104114

0 commit comments

Comments
 (0)