Title: rustc IDE
Estimate: 1 or 2 meeting
Type: technical
Figure out further steps to make rustc a perfect-for-ides compiler, based on experience with rust-analyzer so far.
At the latest Rust all-hands we've figured out that we probably want to do a significant re-engeneering of compiler internals to make it a good IDE backend. The first step was to experiment with alternative compiler architecture, based on the rust-analyzer project. The experiment so far is pretty successful, so it's time to move forward, beyond the experimental state, so that we avoid the problem of two parallel compilers.
I don't know the specific actions should we take, but the general theme seems to be clear: we want to split rustc into more or less independent libraries, making sure that each new library is usable both from the current rustc-architecture, and from the hypothetical IDE-first architecture of the future.
Some specific promising areas for librarification are:
- trait solving (chalk): this work is already in progress. What are the blockers for finishing this work?
- parsing: we already extracted the lexer bit into a stand alone library, could we do the same with the parser?
- type checking: another bit of the compiler that seems relatively self-contained.
- name resolution & macro expansion: this bit seems pretty entangled with the current AST data structure, but, at the same time, it's the most valuable to extract, as it impacts the IDE experience the most.