]> git.lizzy.rs Git - rust.git/blob - CONTRIBUTING.md
add test for impl recovery
[rust.git] / CONTRIBUTING.md
1 The project is in its early stages: contributions are welcome and
2 would be **very** helpful, but the project is not *yet* optimized for
3 contribution. Moreover, it is doubly experimental, so there's no
4 guarantee that any work here would reach production. That said, here
5 are some areas where contributions would be **especially** welcome:
6
7
8 * Designing internal data structures: RFC only outlines the
9   constraints, it's an open question how to satisfy them in the
10   optimal way. See `ARCHITECTURE.md` for current design questions.
11
12 * Porting libsyntax parser to rust-analyzer: currently rust-analyzer parses
13   only a tiny subset of Rust. This should be fixed by porting parsing
14   functions from libsyntax one by one. Take a look at the
15   [libsyntax parser](https://github.com/rust-lang/rust/blob/6b99adeb11313197f409b4f7c4083c2ceca8a4fe/src/libsyntax/parse/parser.rs)
16   for "what to port" and at the
17   [Kotlin parser](https://github.com/JetBrains/kotlin/blob/4d951de616b20feca92f3e9cc9679b2de9e65195/compiler/frontend/src/org/jetbrains/kotlin/parsing/KotlinParsing.java)
18   for "how to port".
19
20 * Writing validators: by design, rust-analyzer is very lax about the
21   input. For example, the lexer happily accepts unclosed strings. The
22   idea is that there should be a higher level visitor, which walks the
23   syntax tree after parsing and produces all the warnings. Alas,
24   there's no such visitor yet :( Would you like to write one? :)
25
26 * Creating tests: it would be tremendously helpful to read each of
27   libsyntax and rust-analyzer parser functions and crate a small separate
28   test cases to cover each and every edge case.
29
30 * Building stuff with rust-analyzer: it would be really cool to compile
31   rust-analyzer to WASM and add *client side* syntax validation to rust
32   playground!
33
34
35 Do take a look at the issue tracker.
36
37 If you don't know where to start, or have *any* questions or suggestions,
38 don't hesitate to chat at [Gitter](https://gitter.im/libsyntax2/Lobby)!