Re: [PATCH] scripts: generate_rust_analyzer: reduce the output file size
From: Jesung Yang
Date: Thu Jan 01 2026 - 20:04:37 EST
On Fri, Jan 2, 2026 at 7:09 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> On Thu, 01 Jan 2026 08:21:24 +0000
> Jesung Yang via B4 Relay <devnull+y.j3ms.n.gmail.com@xxxxxxxxxx> wrote:
>
> > From: Jesung Yang <y.j3ms.n@xxxxxxxxx>
> >
> > Use the `cfg_groups` field to aggregate common configurations into a
> > single project-level definition. This avoids repeating identical `cfg`s
> > across crates.
> >
> > As a result, the size of the generated `rust-project.json` is reduced
> > from 11MiB to 406KiB (about 96% reduction).
>
> This feature is not available with Rust Analyzer 1.78.
I suspect you are referring to the rust-analyzer component shipped via
rustup when the 1.78 toolchain is active.
Do we apply our MSRV policy to rust-analyzer as well? The latest
rust-analyzer release supports older Rust versions, including 1.78. In
practice, I believe many people who rely on a language server use the
version provided by their editor extension or IDE, which is usually the
most recent release. AFAIK, it is actually more difficult to use an old
release of rust-analyzer, as it often requires extra setup to manually
downgrade or pin the version.
By the way, thanks for pointing this out!
Best regards,
Jesung