Index | Thread | Search

From:
Madeline Baggins <madeline@baggins.family>
Subject:
Fwd: lang/rust Port - Missing proc-macro-srv binary
To:
ports@openbsd.org
Date:
Sun, 14 Jun 2026 09:25:15 +1000

Download raw body.

Thread
  • Madeline Baggins:

    lang/rust Port - Missing proc-macro-srv binary

Didn't hear back from sebastien, apologies that this isn't up to date.
Please advise if I've sent this to the wrong place. Thanks <3


-------- Original Message --------
From: Madeline Baggins <madeline@baggins.family>
Sent: 7 May 2026 4:09:08 pm AEST
To: semarie@kapouay.eu.org
Subject: lang/rust Port - Missing proc-macro-srv binary

Hi Sebastien,

I've been playing around with Rust on OpenBSD and hit a wall with 
rust-analyzer not wanting to expand macros. Turns out this is because of a 
missing binary at /usr/local/libexec/rust-analyzer-proc-macro-srv.

Looks like rust-analyzer uses this binary to hook into whatever version of 
rustc you're running to expand macros.

I was able to generate the binary by adding rust-analyzer to the tools 
section and at do-build. I've attached a cvs diff.

Because the version of rust-analyzer on my system was too old I then had 
to switch to 0.0.307 from crates.io but it worked fine after that.

sysctl -n kern.version shows:

OpenBSD 7.8 (GENERIC) #54: Sun Oct 12 12:45:58 MDT 2025
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC

The CVS tag shows: TOPENBSD_7_8

Let me know if there's somewhere else I should send this or if you need 
any more info. I'm a barista from Australia and just a hobbyist programmer 
so apologies if I've bothered the wrong person, bit new to this.

Many thanks,
Madeline Baggins
? cvs_diff.txt
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
diff -u -p -r1.233 Makefile
--- Makefile	18 Sep 2025 14:10:27 -0000	1.233
+++ Makefile	7 May 2026 06:04:01 -0000
@@ -221,7 +221,7 @@ do-configure:
 	echo 'gdb = "${LOCALBASE}/bin/egdb"' >>${WRKBUILD}/config.toml
 	echo 'vendor = true' >>${WRKBUILD}/config.toml
 	echo 'extended = true' >>${WRKBUILD}/config.toml
-	echo 'tools = ["cargo", "clippy", "rustdoc", "rustfmt"]' >>${WRKBUILD}/config.toml
+	echo 'tools = ["cargo", "clippy", "rustdoc", "rustfmt", "rust-analyzer"]' >>${WRKBUILD}/config.toml
 	echo 'docs = false' >>${WRKBUILD}/config.toml
 	echo 'verbose = 2' >>${WRKBUILD}/config.toml
 	echo 'host = ["${TRIPLE_ARCH}"]' >>${WRKBUILD}/config.toml
@@ -261,7 +261,7 @@ TEST_BIN = cd ${WRKBUILD} && exec ${SETE
 
 do-build:
 	${BUILD_BIN} dist --jobs=${MAKE_JOBS} \
-		rust-std rustc cargo clippy rustfmt rust-src
+		rust-std rustc cargo clippy rustfmt rust-src rust-analyzer
 	rm -rf -- ${WRKBUILD}/build/tmp
 
 COMPONENTS =	rustc-${V}-${TRIPLE_ARCH} \
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/rust/pkg/PLIST-main,v
diff -u -p -r1.55 PLIST-main
--- pkg/PLIST-main	27 Jun 2025 07:48:08 -0000	1.55
+++ pkg/PLIST-main	7 May 2026 06:04:01 -0000
@@ -37,6 +37,7 @@ lib/rustlib/${TRIPLE_ARCH}/lib/libsysroo
 lib/rustlib/${TRIPLE_ARCH}/lib/libtest-${LIBRUST_HASH}19.rlib
 lib/rustlib/${TRIPLE_ARCH}/lib/libunicode_width-${LIBRUST_HASH}1a.rlib
 lib/rustlib/${TRIPLE_ARCH}/lib/libunwind-${LIBRUST_HASH}1b.rlib
+libexec/rust-analyzer-proc-macro-srv
 @man man/man1/cargo-add.1
 @man man/man1/cargo-bench.1
 @man man/man1/cargo-build.1