Rust-Analyzer Architecture

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Access the most powerful time series database as a service
  • rust-analyzer

    A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer] (by rust-analyzer)

    It is also worth noting that rust-analyzer is the successor to RLS. If anyone is still using the RLS (most editor plugins can be configured to use either), they should switch to rust-analyzer. It is soon to be the "official" rust LSP [0].

    0: https://github.com/rust-analyzer/rust-analyzer/issues/4224

  • language-server-protocol

    Defines a common protocol for language servers.

    It looks like this is blocked upstream by the language server protocol not passing the current selection for hover requests [0].

    0: https://github.com/microsoft/language-server-protocol/issues...

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support. Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • intellij-lsp-server

    Exposes IntelliJ IDEA features through the Language Server Protocol.

    The LSP means every single language server has to reinvent the wheel again and again.

    It’d have been much more useful to build bindings for IDEA plugins so they could be integrated into arbitrary editors, especially as the IDEA plugins for most languages even after several years of LSP development are still superior.

    All in all it’s like the whole JVM vs. WASM, Java vs Electron story again, with someone deciding to reinvent the wheel but worse.

    There’s even bindings like https://github.com/Ruin0x11/intellij-lsp-server or https://plugins.jetbrains.com/plugin/10209-lsp-support to glue it all back together.

    It’d have been much simpler to reuse an existing ecosystem from the start.

  • intellij-lsp

    Plugin adding Language Server Protocol support for IntelliJ

    IDEA has a language-server plugin: https://github.com/gtache/intellij-lsp

  • eglot

    A client for Language Server Protocol servers

  • chalk

    An implementation and definition of the Rust trait system using a PROLOG-like logic solver (by rust-lang)

    RA uses chalk [1], which is a trait solver rewrite for rustc. You can already use it on nightly with a feature flag.

    So RA can get close to the trait resolution of the compiler, which is probably the most challenging part. I haven't used Intellij in a while, but I doubt they can ever get close with their custom implementation.

    [1] https://github.com/rust-lang/chalk

  • neovim

    Vim-fork focused on extensibility and usability

    Take a look at neovim 0.5 beta [0]. It has native support for LSP [1], and it's on par with other editors.

    [0]: https://github.com/neovim/neovim

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • nvim-lspconfig

    Quickstart configs for Nvim LSP

  • intellij-rust

    Rust plugin for the IntelliJ Platform

    >And every single language server has to reimplement all these from scratch.

    This is mostly true about IDEA as well. Take a look at the extractFunction implementation from IntelliJ Rust:

    https://github.com/intellij-rust/intellij-rust/tree/6b2c4dfa...

    It is based on a generic `RefactoringActionHandler`, and not on the specialized `ExtractFunctionActionHandler`.

    There's relatively little code sharing you can do for high-level things in IDEs.

    The use interface sharing is another thing, and that is exactly what LSP achieves: it standardizes common actions across many languages.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts