‹ BackHN Continuity

Thread

Why building a Rust LSP is hard

144 points · 77 comments · agluszak

  1. mitxela · · focus · HN ↗
    Using a JSON TCP connection for what on Windows would be direct function calls (COM) or in Eclipse would be direct function calls between Java modules always felt a bit gross.
    1. Panzerschrek · · focus · HN ↗
      TCP isn't really necessary. Usually a language server just uses stdin/stdout, which are just pipes.

      And overall overhead for running a language server in a separate process isn't that big. LSP is designed in such a way that only minimal amount of information is needed to be passed, like edits or short responses. Packing/unpacking JSONs isn't a bottleneck, the heaviest job like program analysis is done in the language server itself without interprocess communication overhead involved.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.