I’ve been providing some feedback on an RFC Nick Cameron is writing about providing rust compiler support for IDEs. In order to gain some understanding I’ve been experimenting with a prototype tool to perform type analysis on a crate as fast as possible (as you type).

I wanted to demo this tool and racer to Nick, but unfortunately getting experimental code to compile with rustc is error-prone due to rustc being a fast-moving target. Instead I made a couple of videos to show Nick what I was up to. I thought they might be interesting to other people so with his permission I’m posting them here:

(I’m not very good at speaking on videos so these are a bit mumbly, sorry!)

As I see them, the big upcoming challenges from the perspective of code completion are:

Creating a useful stable interface to rustc that can be used to extract semantic type and lifetime information Performing rustc analysis on incomplete crates (so that the results can be used for providing completions + suggestions as you type) Performing the (incremental) analysis with sub-100ms latencies

I’m very excited about the prospect of rustc-enabled perfect completions, and am also eager to work on other functionality for racer (I use intellij daily at work and really miss the ‘extract-method’ refactoring when writing rust code).