Skip to content

Instantly share code, notes, and snippets.

@Xanewok
Created July 31, 2017 10:18
Show Gist options
  • Save Xanewok/f4f5583c45f2e720168f49a3d2b29df3 to your computer and use it in GitHub Desktop.
Save Xanewok/f4f5583c45f2e720168f49a3d2b29df3 to your computer and use it in GitHub Desktop.
Teaching an IDE to understand Rust
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Abstract
IDE support is one of Rust's most requested features. From the 2017 State of Rust Survey: roughly 30% of Rust users are looking forward to IDE support more than any other feature in 2017 and for 22% of non-users, lack of IDE support is their main reason for not using Rust.
In this talk, I'll cover what it took to support Cargo workspaces in the RLS and I'll explain how the RLS leverages
existing tooling, including Cargo and the compiler. I'll demonstrate the current state of Rust programming with an IDE, and how you can benefit from using an IDE with your Rust projects.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Details
Planned talk structure:
5 minutes: brief introduction of RLS architecture
5 minutes: demonstration of IDE features
5 minutes: introduction to Cargo workspaces and how Cargo coordinates builds
10 minutes: deep dive into RLS support for Cargo workspaces, including demonstrations
5 minutes: Q&A
During the demonstration of the IDE features, I plan to show how common features, such as goto definition, find all references, and autocompletion work in practice, using Visual Studio Code as an editor.
I'll briefly introduce the audience to what Cargo workspaces are and how they can help structure medium-sized and large projects. I plan to go discuss in-depth the changes that were necessary to the RLS to support Cargo workspaces. I'll cover how the new architecture is designed not to be reliant on a particular build system, such as Cargo. In the last few minutes, I'll demonstrate how supporting multiple active crates works on an example workspace and hopefully also on a real-life, large-scale case, such as WebRender (dependent on implementation progress). This will prove to be interesting, since it'll show the real-life applications and benefits made possible with the new workspace support in the RLS.
This talk will be interesting for everybody!
Potential and beginner Rustaceans will be shown that basic IDE support exists and that it can boost their productivity, using their favourite code editor.
More advanced users will learn about Cargo workspaces in the IDE context.
Finally, expert users will get to learn about RLS and Cargo internals.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Pitch
IDE support is high priority on Rust's roadmap for 2017. It was a highly desired feature in the 2016 and 2017 surveys. Historically, IDE support for Rust has been lacking, and since solid-but-basic experience is here today, I believe that increasing the awareness about it will benefit the Rust community.
This year I had the pleasure to enroll as a Student for the Google Summer of Code. I worked on the RLS and specifically focused on implementing support for Cargo workspaces and multiple crates, increased conformance with Language Server Protocol, as well as some smaller fixes and improvements. During that time, and before, I have contributed PRs to the RLS and the Visual Studio Code extension that's developed alongside it.
I have used IDEs a lot when I worked as a C++ game developer. I know that IDE support can be crucial to stay productive. This, along with the work I did on the RLS, leads me to believe that I will have something interesting to share with fellow Rustaceans regarding IDE support in Rust.
I would like to add that this would be my first conference talk. I believe that I have interesting experiences to share, and I think that RustFest would be a good environment to share those. Also a good place for me to improve my public speaking - I'd appreciate any mentoring on the talk that the organizers can offer.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Bio
Being passionate about video games, Igor now spends his time creating them rather than playing them. Having worked on a AAA game and numerous smaller games, he grew tired of repetitiveness of the process and ventured on a journey to find a language that would both aid in and enforce building proper abstractions. After enrolling as a Student for Google Summer of Code 2017, he decided to help further the Rust IDE story, so the development process would not only be better, but also more enjoyable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment