# How to install \`rust-analyzer-proc-macro-srv-cli\`?

**URL:** <https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306>\
**Category:** tools and infrastructure\
**Created:** [January 31, 2025, 3:22pm UTC](https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306 "2025-01-31T15:22:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![woshilapin](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/woshilapin/32/7071_2.png) [@woshilapin](https://internals.rust-lang.org/u/woshilapin)\
**Post date:** [January 31, 2025, 3:22pm UTC](https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306/1 "2025-01-31T15:22:46Z")

</div>

I'm trying to understand how to properly install `rust-analyzer-proc-macro-srv-cli` (the final goal is packaging `rust-analyzer` for the Linux distribution [Guix](https://guix.gnu.org/)).

So far, I've been able to understand that `./x.py build src/tools/rust-analyzer` then `./x.py install rust-analyzer` is deploying the `rust-analyzer` binary in the expected place (with the help of `prefix` in `config.toml`).

I've looked for a similar path to provide the `rust-analyzer-proc-macro-srv-cli` binary and found in ["How to build and run"](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain) a section mentioning `./x.py build proc-macro-srv-cli`. And indeed, after running that command, I'm able to find the `rust-analyzer-proc-macro-srv-cli` binary built in my `build/` folder (and I was not seeing the binary before that). However, I'm not able to find the right incantation to `install` this binary. I've looked in `./x.py install --help --verbose` that show a list of (exhaustive?) options and none of them seems to correspond.

Where did I miss something?

---

<div class="post-metadata">

**Author:** ![bjorn3](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/bjorn3/32/2736_2.png) [@bjorn3](https://internals.rust-lang.org/u/bjorn3)\
**Post date:** [January 31, 2025, 4:32pm UTC](https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306/2 "2025-01-31T16:32:06Z")

</div>

The rust-analyzer-proc-macro-srv is part of the rustc component and as such installed together with rustc. You can find it in `libexec`. I strongly recommend packaging it in the package that contains rustc rather than the package that contains rust-analyzer in case someone wants to use a different rust-analyzer version (for example the one bundled with the vscode extension or downloaded by zed). Each rust-analyzer-proc-macro-srv works only with the respective rustc version, but works with a range of rust-analyzer versions.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [July 25, 2026, 4:32pm UTC](https://internals.rust-lang.org/t/how-to-install-rust-analyzer-proc-macro-srv-cli/22306/3 "2026-07-25T16:32:37Z")

</div>

Closed on July 25, 2026, 4:32pm UTC

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.
