aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-13 10:51:26 +0000
committerAleksey Kladov <[email protected]>2019-01-13 10:51:26 +0000
commitafe5f26239e04b156963ac8d01371847f965e359 (patch)
treedffa82790e5753493c1dbe817d224ecb316e585b
parent8e554ea5faa1158e084462162d5e1932db5c81c2 (diff)
tweak readme
-rw-r--r--README.md76
1 files changed, 33 insertions, 43 deletions
diff --git a/README.md b/README.md
index 0b7203d2c..cbb72c8cf 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,13 @@
2 2
3[![Build Status](https://travis-ci.org/rust-analyzer/rust-analyzer.svg?branch=master)](https://travis-ci.org/rust-analyzer/rust-analyzer) 3[![Build Status](https://travis-ci.org/rust-analyzer/rust-analyzer.svg?branch=master)](https://travis-ci.org/rust-analyzer/rust-analyzer)
4 4
5Rust Analyzer is an **experimental** modular compiler frontend for the 5Rust Analyzer is an **experimental** modular compiler frontend for the Rust
6Rust language, which aims to lay a foundation for excellent IDE 6language, which aims to lay a foundation for excellent IDE support.
7support.
8 7
9It doesn't implement much of compiler functionality yet, but the 8It doesn't implement much of compiler functionality yet, but the white-space
10white-space preserving Rust parser works, and there are significant 9preserving Rust parser works, and there are significant chunks of overall
11chunks of overall architecture (indexing, on-demand & lazy 10architecture (indexing, on-demand & lazy computation, snapshotable world view)
12computation, snapshotable world view) in place. Some basic IDE 11in place. Some basic IDE functionality is provided via a language server.
13functionality is provided via a language server.
14 12
15Work on the Rust Analyzer is sponsored by 13Work on the Rust Analyzer is sponsored by
16 14
@@ -30,53 +28,45 @@ $ cargo run --package ra_cli parse < crates/ra_syntax/src/lib.rs
30 28
31# show symbols of a Rust file 29# show symbols of a Rust file
32$ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs 30$ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs
33```
34 31
35To try out the language server, see [these 32# install the language server
36instructions](./editors/README.md). Please note that the server is not 33$ cargo install --path crates/ra_lsp_server
37ready for general use yet. If you are looking for a Rust IDE that 34```
38works, use [IntelliJ
39Rust](https://github.com/intellij-rust/intellij-rust) or
40[RLS](https://github.com/rust-lang-nursery/rls). That being said, the
41basic stuff works, and rust analyzer is developed in the rust analyzer
42powered editor.
43 35
36See [these instructions](./editors/README.md) for VS Code setup and the list of
37features (some of which are VS Code specific).
44 38
45## Current Status and Plans 39## Current Status and Plans
46 40
47Rust analyzer aims to fill the same niche as the official [Rust 41Rust analyzer aims to fill the same niche as the official [Rust Language
48Language Server](https://github.com/rust-lang-nursery/rls), but uses a 42Server](https://github.com/rust-lang-nursery/rls), but uses a significantly
49significantly different architecture. More details can be found [in 43different architecture. More details can be found [in this
50this
51thread](https://internals.rust-lang.org/t/2019-strategy-for-rustc-and-the-rls/8361), 44thread](https://internals.rust-lang.org/t/2019-strategy-for-rustc-and-the-rls/8361),
52but the core issue is that RLS works in the "wait until user stops 45but the core issue is that RLS works in the "wait until user stops typing, run
53typing, run the build process, save the results of the analysis" mode, 46the build process, save the results of the analysis" mode, which arguably is the
54which arguably is the wrong foundation for IDE. 47wrong foundation for IDE.
55 48
56Rust Analyzer is a hobby project at the moment, there's exactly zero 49Rust Analyzer is an experimental project at the moment, there's exactly zero
57guarantees that it becomes production-ready one day. 50guarantees that it becomes production-ready one day.
58 51
59The near/mid term plan is to work independently of the main rustc 52The near/mid term plan is to work independently of the main rustc compiler and
60compiler and implement at least simplistic versions of name 53implement at least simplistic versions of name resolution, macro expansion and
61resolution, macro expansion and type inference. The purpose is two 54type inference. The purpose is two fold:
62fold:
63 55
64* to quickly bootstrap usable and useful language server: solution 56* to quickly bootstrap usable and useful language server: solution that covers
65 that covers 80% of Rust code will be useful for IDEs, and will be 57 80% of Rust code will be useful for IDEs, and will be vastly simpler than 100%
66 vastly simpler than 100% solution. 58 solution.
67 59
68* to understand how the consumer-side of compiler API should look like 60* to understand how the consumer-side of compiler API should look like
69 (especially it's on-demand aspects). If you have 61 (especially it's on-demand aspects). If you have `get_expression_type`
70 `get_expression_type` function, you can write a ton of purely-IDE 62 function, you can write a ton of purely-IDE features on top of it, even if the
71 features on top of it, even if the function is only partially 63 function is only partially correct. Pluging in the precise function afterwards
72 correct. Plugin in the precise function afterwards should just make 64 should just make IDE features more reliable.
73 IDE features more reliable. 65
74 66The long term plan is to merge with the mainline rustc compiler, probably around
75The long term plan is to merge with the mainline rustc compiler, 67the HIR boundary? That is, use rust analyzer for parsing, macro expansion and
76probably around the HIR boundary? That is, use rust analyzer for 68related bits of name resolution, but leave the rest (including type inference
77parsing, macro expansion and related bits of name resolution, but 69and trait selection) to the existing rustc.
78leave the rest (including type inference and trait selection) to the
79existing rustc.
80 70
81## Getting in touch 71## Getting in touch
82 72