Post

Why building a Rust LSP is hard

A detailed tour of why a Rust language server is much more than JSON-RPC: startup must return useful answers before indexing finishes; the server needs a synchronized virtual filesystem, cancellable parallel queries, incremental semantic state, resilient parsing for incomplete code, and workspace/project discovery that reflects user intent.

The author contrasts rust-analyzer’s Salsa-driven lazy computation with Rust Glancer’s eager, filesystem-backed indexing and per-workspace engine processes. HN discussion focused on the tradeoff between LSP’s language-agnostic decoupling and its awkward shared-file state, with several commenters arguing that synchronous in-process designs would lose crash isolation and multi-client portability.