Tech

Rust Glancer offers lighter alternative to rust-analyzer for resource-constrained developers

A new open-source tool aims to reduce memory usage by up to 100 times compared to the standard Rust language server, utilising a frozen analysis architecture to keep RAM consumption under 100MB.

Editorial persona
Owen Mercer
Markets and Finance Editor
Published
Draft
Source: Hacker News · View original source
Tech
No image available
Technology

A developer has released Rust Glancer, an alternative Language Server Protocol (LSP) implementation for the Rust programming language designed to address the high memory consumption of the standard rust-analyzer. The project, which was developed over four months, maintains RAM usage under 100MB during operation, a significant reduction from the 16GB observed in the developer’s specific multi-project workflow using rust-analyzer.

The tool utilises a "frozen analysis" architecture, where the workspace is indexed once and results are preserved in the filesystem. Unlike the incremental approach of rust-analyzer, Rust Glancer invalidates the analysis only upon saving a file. This design choice allows the tool to remain suitable for older computers or those with limited resources, such as the developer’s 2020 MacBook Pro M1 with 8GB of RAM, although it trades some speed for lower memory overhead.

Rust Glancer supports core LSP actions including goto definition, hover, inlay hints, and completions, alongside a full indexing pipeline with type inference and a trait solver. However, the project remains in an early stage, with known bugs and a lack of support for build scripts and proc macros. The developer notes that while the tool is not as fast as rust-analyzer, it is optimised for large amounts of out-of-editor changes, making it potentially useful for agentic workflows.

The codebase was developed with heavy use of Large Language Models (LLMs), though the developer emphasises that it was not "vibe coded" and that each pull request was manually verified. The developer, who has approximately seven years of professional experience in Rust and has contributed to rustc, clippy, and rust-analyzer, began using Rust Glancer as their daily driver about 1.5 months before its release.

The project includes a custom profiling stack that measures performance and memory usage, enabling direct comparison against rust-analyzer. The developer acknowledges that the code may not be fully idiomatic in terms of compiler tooling design but maintains that the LLMs served as a tool to accelerate learning and development rather than a replacement for human oversight.

Rust Glancer is available for installation via a VS Code extension or by building from the repository. While rust-analyzer is expected to remain the default choice for projects requiring completeness and keystroke accuracy, Rust Glancer offers a viable option for developers willing to accept certain trade-offs to reduce RAM usage.

Continue reading

More from Tech

Read next: Meta launches consumer AI agent Muse with web, shopping and travel tools
Read next: Engadget sets out cleaning guide for secondhand electronics
Read next: Former EPA officials warn AI data centre push could raise pollution risks