diff options
Diffstat (limited to 'docs/dev/architecture.md')
-rw-r--r-- | docs/dev/architecture.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 081ee5b9d..ead12616e 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -209,7 +209,7 @@ If you want to use IDE parts of rust-analyzer via LSP, custom flatbuffers-based | |||
209 | The API uses editor's terminology, it talks about offsets and string labels rather than in terms of definitions or types. | 209 | The API uses editor's terminology, it talks about offsets and string labels rather than in terms of definitions or types. |
210 | It is effectively the view in MVC and viewmodel in [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel). | 210 | It is effectively the view in MVC and viewmodel in [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel). |
211 | All arguments and return types are conceptually serializable. | 211 | All arguments and return types are conceptually serializable. |
212 | In particular, syntax tress and and hir types are generally absent from the API (but are used heavily in the implementation). | 212 | In particular, syntax tress and hir types are generally absent from the API (but are used heavily in the implementation). |
213 | Shout outs to LSP developers for popularizing the idea that "UI" is a good place to draw a boundary at. | 213 | Shout outs to LSP developers for popularizing the idea that "UI" is a good place to draw a boundary at. |
214 | 214 | ||
215 | `ide` is also the first crate which has the notion of change over time. | 215 | `ide` is also the first crate which has the notion of change over time. |
@@ -230,7 +230,7 @@ This crate defines the `rust-analyzer` binary, so it is the **entry point**. | |||
230 | It implements the language server. | 230 | It implements the language server. |
231 | 231 | ||
232 | **Architecture Invariant:** `rust-analyzer` is the only crate that knows about LSP and JSON serialization. | 232 | **Architecture Invariant:** `rust-analyzer` is the only crate that knows about LSP and JSON serialization. |
233 | If you want to expose a datastructure `X` from ide to LSP, don't make it serializable. | 233 | If you want to expose a data structure `X` from ide to LSP, don't make it serializable. |
234 | Instead, create a serializable counterpart in `rust-analyzer` crate and manually convert between the two. | 234 | Instead, create a serializable counterpart in `rust-analyzer` crate and manually convert between the two. |
235 | 235 | ||
236 | `GlobalState` is the state of the server. | 236 | `GlobalState` is the state of the server. |
@@ -418,7 +418,7 @@ We use `always` and `never` macros instead of `assert` to gracefully recover fro | |||
418 | 418 | ||
419 | ### Observability | 419 | ### Observability |
420 | 420 | ||
421 | rust-analyzer is a long-running process, so its important to understand what's going on inside. | 421 | rust-analyzer is a long-running process, so it is important to understand what's going on inside. |
422 | We have several instruments for that. | 422 | We have several instruments for that. |
423 | 423 | ||
424 | The event loop that runs rust-analyzer is very explicit. | 424 | The event loop that runs rust-analyzer is very explicit. |