aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-09-16 12:29:34 +0100
committerAleksey Kladov <[email protected]>2018-09-16 12:29:34 +0100
commitcc76b0d31d8ba013c499dd3a4ca69b37004795e6 (patch)
treed83c46b8774ceee93467e1da942d511b7be4b390
parentb5021411a84822cb3f1e3aeffad9550dd15bdeb6 (diff)
Update readme
-rw-r--r--README.md54
1 files changed, 47 insertions, 7 deletions
diff --git a/README.md b/README.md
index deb4a918c..41fc8bbba 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,18 @@
1# libsyntax2.0 1# Rust Analyzer
2 2
3[![Build Status](https://travis-ci.org/matklad/libsyntax2.svg?branch=master)](https://travis-ci.org/matklad/libsyntax2) 3[![Build Status](https://travis-ci.org/matklad/rust-analyzer.svg?branch=master)](https://travis-ci.org/matklad/rust-analyzer)
4[![Build status](https://ci.appveyor.com/api/projects/status/j56x1hbje8rdg6xk/branch/master?svg=true)](https://ci.appveyor.com/project/matklad/libsyntax2/branch/master) 4[![Build status](https://ci.appveyor.com/api/projects/status/j56x1hbje8rdg6xk/branch/master?svg=true)](https://ci.appveyor.com/project/matklad/rust-analyzer/branch/master)
5 5
6 6
7libsyntax2.0 is an **experimental** parser of the Rust language, 7Rust Analyzer is an **experimental** modular compiler frontend for the
8intended for the use in IDEs. 8Rust language, which aims to lay a foundation for excellent IDE
9[RFC](https://github.com/rust-lang/rfcs/pull/2256). 9support.
10 10
11It doesn't implement much of compiler functionality yet, but the
12white-space preserving Rust parser works, and there are significant
13chunks of overall architecture (indexing, on-demand & lazy
14computation, snapshotable world view) in place. Some basic IDE
15functionality is provided via a language server.
11 16
12## Quick Start 17## Quick Start
13 18
@@ -16,7 +21,6 @@ $ cargo test
16$ cargo parse < crates/libsyntax2/src/lib.rs 21$ cargo parse < crates/libsyntax2/src/lib.rs
17``` 22```
18 23
19
20## Trying It Out 24## Trying It Out
21 25
22This installs experimental VS Code plugin 26This installs experimental VS Code plugin
@@ -61,6 +65,42 @@ doesn't hurt too much :-)
61 65
62* **Go to definition** ("correct" for `mod foo;` decls, index-based for functions). 66* **Go to definition** ("correct" for `mod foo;` decls, index-based for functions).
63 67
68## Current Status and Plans
69
70Rust analyzer aims to fill the same niche as the official [Rust
71Language Server](https://github.com/rust-lang-nursery/rls), but
72better. It was created because @matklad is not satisfied with RLS
73original starting point and current direction. More details can be
74found [in this
75thread](https://internals.rust-lang.org/t/2019-strategy-for-rustc-and-the-rls/8361).
76The core issue is that RLS works in the "wait until user stops typing,
77run the build process, save the results of the analysis" mode, which
78arguably is the wrong foundation for IDE (see the thread for details).
79
80Rust Analyzer is a hobby project at the moment, there's exactly zero
81guarantees that it becomes production-ready one day.
82
83The near/mid term plan is to work independently of the main rustc
84compiler and implement at least simplistic versions of name
85resolution, macro expansion and type inference. The purpose is two
86fold:
87
88* to quickly bootstrap usable and useful language server: solution
89 that covers 80% of Rust code will be useful for IDEs, and will be
90 vastly simpler than 100% solution.
91
92* to understand how the consumer-side of compiler API should look like
93 (especially it's on-demand aspects). If you have
94 `get_expression_type` function, you can write a ton of purely-IDE
95 features on top of it, even if the function is only partially
96 correct. Plugin in the precise function afterwards should just make
97 IDE features more reliable.
98
99The long term plan is to merge with the mainline rustc compiler,
100probably around the HIR boundary? That is, use rust analyzer for
101parsing, macro expansion and related bits of name resolution, but
102leave the rest (including type inference and trait selection) to the
103existing rustc.
64 104
65## Code Walk-Through 105## Code Walk-Through
66 106