From 6d14bb0cd0af55fe45711ac048236f9dd9d24a3f Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Mon, 10 Dec 2018 23:07:07 +0900 Subject: Update ARCHITECTURE.md --- ARCHITECTURE.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'ARCHITECTURE.md') 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. See [#93](https://github.com/rust-analyzer/rust-analyzer/pull/93) for an example PR which fixes a bug in the grammar. +### `crates/ra_hir` + +HIR (previsouly known as descriptors) provides a high-level OO acess to Rust +code. + +The principal difference between HIR and syntax trees is that HIR is bound +to a particular crate instance. That is, it has cfg flags and features +applied. So, there relation between syntax and HIR is many-to-one. ### `crates/ra_editor` @@ -72,13 +80,6 @@ syntax tree as an input. The tests for `ra_editor` are `#[cfg(test)] mod tests` unit-tests spread throughout its modules. -### `crates/salsa` - -An implementation of red-green incremental compilation algorithm from -rust compiler. It makes all rust-analyzer features on-demand. To be replaced -with `salsa-rs/salsa` soon. - - ### `crates/ra_analysis` A stateful library for analyzing many Rust files as they change. @@ -87,6 +88,8 @@ current state, incorporates changes and handles out `Analysis` --- an immutable consistent snapshot of world state at a point in time, which actually powers analysis. +### `crates/ra_db` +This defines basic database traits. Concrete DB is defined by ra_analysis. ### `crates/ra_lsp_server` @@ -97,8 +100,15 @@ See [#79](https://github.com/rust-analyzer/rust-analyzer/pull/79/) as an example of PR which adds a new feature to `ra_editor` and exposes it to `ra_lsp_server`. +### `crates/gen_lsp_server` + +A language server scaffold, exposing a synchronous crossbeam-channel based API. +This crate handles protocol handshaking and parsing messages, while you +control the message dispatch loop yourself. + +Run with `RUST_LOG=sync_lsp_server=debug` to see all the messages. -### `crates/cli` +### `crates/ra_cli` A CLI interface to rust-analyzer. -- cgit v1.2.3