The Rust Language Server, which enables IDEs and other tools to accommodate the Rust programming language, has moved to an alpha release stage.
In this release, RLS allows tools to access capabilities including auto-completion, find all references, rename/refactor, show errors, and goto-definition. RLS leverages Language Server Protocol, a Microsoft- and Red Hat-backed effort to extend IDEs and code editors to multiple languages.
“Rather than leaving each editor plugin to have to parse and understand the types in your program and provide you with capabilities like refactoring, the RLS centralizes all this logic and provides it to the editor via a standard language server protocol,” said Jonathan Turner, an engineer with Rust sponsor Mozilla.
RLS will work with any IDE supporting the protocol. Current supportive clients include the Eclipse and Eclipse IDEs along with Microsoft Visual Studio Code. Next up for RLS is a second alpha release followed by a beta version, due March 17.
The alpha release has been run on Linux, Mac, and Windows. It was built from two tools: the Racer Rust code completion utility and the Rust compiler. “Racer allows us to get quick-and-dirty completions, allow you to get completion results in sub-second times,” Turner said. “The trade-off this makes is that the results are not as accurate.” For tasks requiring higher accuracy, like code refactoring, RLS users the compiler directly.
Developers interested in RLS are encourage to report on how it works for them and contribute to the project. In particular, more refactorings and Rust-centric code navigation is sought along with more advanced features such as lifetime visualization and macro debugging. Developers also can contribute an editor plugin and hack on the compiler, Turner said.