From: "Paul Barker" <paul@pbarker.dev>
To: "Benhur Tessele" <benhur.tessele@est.tech>,
<openembedded-core@lists.openembedded.org>
Cc: "Randy MacLeod" <Randy.MacLeod@windriver.com>, <paul@pbarker.dev>,
<mathieu.dubois-briand@bootlin.com>
Subject: Re: [PATCH v2 1/2] rust: package rust-analyzer for the SDK
Date: Mon, 09 Nov 2026 14:15:02 +0000 [thread overview]
Message-ID: <DMQQRJRZA9CX.3IQWB93UOC2QQ@pbarker.dev> (raw)
In-Reply-To: <20261006111230.1478039-2-benhur.tessele@est.tech>
On Tue Oct 6, 2026 at 12:12 PM BST, Benhur Tessele wrote:
> rust-analyzer is built alongside the other Rust tools (clippy, rustfmt)
> but was not installed or packaged. Install it for the nativesdk variant
> and add a rust-tools-analyzer package so it is available in the Rust SDK.
>
> Two additional pieces are required for the tool to be usable:
>
> - The proc-macro server, rust-analyzer-proc-macro-srv, which
> rust-analyzer looks up under <sysroot>/libexec. Install it into
> ${libexecdir}; without it, analysis of any crate using a derive or
> attribute macro fails with "cannot find proc-macro server in sysroot".
>
> - The standard library sources, which rust-analyzer analyses from source
> rather than from the compiled rlibs. Add an RDEPENDS on ${PN}-src-lib
> so that core/std items resolve.
>
> Both binaries link against librustc_driver from the main package, so the
> package also RDEPENDS on ${PN}.
>
> rust-analyzer is deliberately not built for the target: it adds build
> time, is unlikely to be a use case on a target device, and fails to build
> on NEON arm32 tunes (beaglebone-alt, qemuarm-alt) because it pulls its own
> simd-adler32 that uses the unstable feature in 1.98
> "stdarch_arm_neon_intrinsics".
>
> Signed-off-by: Benhur Tessele <benhur.tessele@est.tech>
> ---
> meta/recipes-devtools/rust/rust_1.98.1.bb | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/rust/rust_1.98.1.bb b/meta/recipes-devtools/rust/rust_1.98.1.bb
> index 1f4ce5ebdb..f9d68ea986 100644
> --- a/meta/recipes-devtools/rust/rust_1.98.1.bb
> +++ b/meta/recipes-devtools/rust/rust_1.98.1.bb
> @@ -262,17 +262,21 @@ do_test_compile () {
> ALLOW_EMPTY:${PN} = "1"
>
> PACKAGES =+ "${PN}-rustdoc ${PN}-tools-clippy ${PN}-tools-rustfmt ${PN}-src-lib"
> +PACKAGES:prepend:class-nativesdk = "${PN}-tools-analyzer "
> FILES:${PN}-rustdoc = "${bindir}/rustdoc"
> FILES:${PN}-tools-clippy = "${bindir}/cargo-clippy ${bindir}/clippy-driver"
> FILES:${PN}-tools-rustfmt = "${bindir}/rustfmt"
> +FILES:${PN}-tools-analyzer = "${bindir}/rust-analyzer ${libexecdir}/rust-analyzer-proc-macro-srv"
> FILES:${PN}-src-lib = "${libdir}/rustlib/src/rust"
>
> RDEPENDS:${PN}-rustdoc = "${PN}"
> RDEPENDS:${PN}-tools-clippy = "${PN}"
> RDEPENDS:${PN}-tools-rustfmt = "${PN}"
> +RDEPENDS:${PN}-tools-analyzer = "${PN} ${PN}-src-lib"
>
> SUMMARY:${PN}-tools-clippy = "A collection of lints to catch common mistakes and improve your Rust code"
> SUMMARY:${PN}-tools-rustfmt = "A tool for formatting Rust code according to style guidelines"
> +SUMMARY:${PN}-tools-analyzer = "A language server providing IDE features for Rust"
>
> do_install () {
> rust_do_install
> @@ -294,14 +298,19 @@ rust_do_install:class-nativesdk() {
> rust_runx install
> rust_runx install clippy
> rust_runx install rustfmt
> + rust_runx install rust-analyzer
Is it possible to use a PACKAGECONFIG to enable/disable this as
mentioned previously [1]?
[1]: https://lore.kernel.org/openembedded-core/279396b65a17a09d66e6f191bab1e1be7082d589.camel@pbarker.dev/
Best regards,
--
Paul Barker
next prev parent reply other threads:[~2026-11-09 14:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 11:12 [PATCH v2 0/2] rust: add rust-analyzer support Benhur Tessele
2026-10-06 11:12 ` [PATCH v2 1/2] rust: package rust-analyzer for the SDK Benhur Tessele
2026-11-09 14:15 ` Paul Barker [this message]
2026-10-06 11:12 ` [PATCH v2 2/2] packagegroup-rust-cross-canadian: add rust-analyzer to " Benhur Tessele
2026-11-11 15:44 ` [PATCH v3] rust: add rust-analyzer to the SDK behind a PACKAGECONFIG Benhur Tessele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMQQRJRZA9CX.3IQWB93UOC2QQ@pbarker.dev \
--to=paul@pbarker.dev \
--cc=Randy.MacLeod@windriver.com \
--cc=benhur.tessele@est.tech \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox