Magic Tools
Developer ToolsBy CooconAugust 23, 202613 views3 min read

Someone spent 4 months building a Rust LSP that uses 100x less memory

Someone spent 4 months building a Rust LSP that uses 100x less memory

If you write Rust on an 8GB MacBook, you know the drill: open the project, fans spin up, rust-analyzer chews through a few gigabytes of RAM, and Chrome starts swapping. Everyone complained about it for years. Nobody actually did anything about it.

Until someone spent four months building a replacement.

The numbers first

Rust Glancer is a from-scratch alternative to rust-analyzer, built by one developer in four months, with one goal: keep the language server under 100MB of memory.

Measured on the author's own machines:

  • 8GB M1 MacBook Pro (2020): full indexing in 9 seconds — rust-analyzer needs 14. RAM stays under 100MB the whole time.
  • M4 Max 36GB: 8 seconds vs rust-analyzer's 13.

Not "a bit better". Two orders of magnitude less memory. The project hit 392 points on Hacker News, and the heaviest endorsement comes from matklad, rust-analyzer's own author. He wrote a commentary calling it "incredibly cool" — and casually admitted something uncomfortable about his own project: rowan, the syntax tree library he chose, "is garbage :P".

The core idea: skip incremental, freeze the analysis

Why does rust-analyzer eat so much RAM? The Glancer author breaks it into three parts:

  1. Rust workspaces genuinely have a lot of information to index. That one's unavoidable.
  2. Salsa, the incremental query database — cool approach, but data is inherently stuck in memory.
  3. Rowan, the syntax tree — bought partial invalidation (reparse only the changed line) at the cost of heavy memory fragmentation.

Glancer throws all of that out: no incremental computation. Just a frozen analysis result that gets invalidated on save.

Sounds like a downgrade, but it buys two properties:

  • Glancer can shove analysis results out to the filesystem and load them back only when a query asks.
  • Restarting your editor doesn't trigger re-indexing — the results are already on disk.

Think of rust-analyzer as a library that spreads every book across the table, ready to grab. Glancer shelves everything and fetches the one book you ask for. Slightly slower per query, but the table stays clean.

Glancer is clever about typing, too: no full analysis per keystroke — just a shallow pass over the current function body, reusing the last complete index. The trade-off: new imports, structs, and traits don't get indexed until you save.

matklad's own admission: 1% use case, 99% sacrifice

matklad's commentary is worth reading beyond the endorsement. Rowan was designed for incremental parsing and DOM-style refactoring, he says — "but that's 1% use case. The 99% use case is all the code in your 6666 dependencies which you won't ever look at, but which needs to be at least shallowly analyzed."

He sketches a bigger vision too: IntelliJ's PSI is an interface, not an implementation. Files open in the editor get concrete syntax trees; the rest of the project gets compact stub trees (no function bodies); dependencies are served straight from compiled .rmeta files. rust-analyzer should only switch to full analysis when you actually start poking around ~/.cargo/registry.

That iceberg architecture — incremental analysis only at the tip, everything else read-only, compact, and on disk — nobody has finished building it. Glancer is a step in that direction.

Don't uninstall rust-analyzer yet

Cold water time. Glancer is not a complete LSP: missing features, known bugs, and hard problems like proc-macro expansion are basically off the table. The author says it plainly: Glancer will never become "rust-analyzer, but better". It's for people with weak machines, or people willing to trade some completeness for RAM.

There's one unexpected win for agentic workflows, though: it ships a custom file watcher where out-of-editor changes get lower priority. When an agent bulk-edits your code, you don't get a re-indexing storm, and inlay hints don't drift out of place — a bug matklad admits rust-analyzer itself struggles with.

What you can do today

  • On an 8GB machine: install the VS Code extension and try it. Worst case you uninstall in five minutes.
  • Memory isn't your problem: file away "frozen analysis + on-demand loading". It applies to any memory-hungry indexing tool — language servers, CI caches, search indexes.
  • Spare 15 minutes: read matklad's commentary in full. It's a textbook architecture retrospective.

✨ Originally drafted by DeepSeek, reviewed and polished by Claude.

Sources:

Related Articles

MCP Just Published a New Roadmap: Agent Identity, DPoP, and Streamable HTTP Everywhere

MCP's official roadmap (Aug 22) sets five priority areas: agentic messaging primitives, HTTP-native transport unification, agent identity & enterprise security (DPoP + Workload Identity Federation), improved primitives, and SDK experience. What it means for developers.

developerAug 23, 20264 min
6

Fable 5 Tops the NanoGPT Speedrun: 153 Autonomous Runs, 18 Models, and Who's Really Closing the Gap on Humans

Prime Intellect's NanoGPT Speedrun Frontier compares 18 frontier models across 153 autonomous runs. Fable 5 tops the board at 2,726 steps, closing 81.7% of the gap to the human record. Full leaderboard breakdown, harness analysis, and efficiency comparison.

developerAug 23, 20264 min
6

Dev Breakfast · 2026-08-23

Today's headline: a Rust LSP using two orders of magnitude less memory—Glancer makes 8GB machines viable again. Plus 6 more: Claude Code reportedly A/B testing lowered effort levels; MCP publishes a new roadmap with five priority areas; and more.

daily-intelAug 23, 20267 min
28

Qwen3.8-27B + DFlash 2 on a 24GB Mac mini: a Measured 1.8x, and Why You Won't Get the Official 3x

One week after DFlash 2 shipped, I got Qwen3.8-27B with speculative decoding fully working on a 24GB Mac mini M4: 6.5 tok/s to 11.7–12.2 tok/s at 4-bit, a stable 1.8–1.9x. This post covers the exact deployment commands, three controlled benchmark rounds, the GB-by-GB memory budget, and the three concrete reasons the official 2.7–3.4x number shrinks on consumer Apple Silicon.

qwendflash+6
ai-tutorialsAug 23, 20266 min
18

Published by Magic Tools