diff --git a/meta/recipes-devtools/rust/rust_1.99.1.bb b/meta/recipes-devtools/rust/rust_1.99.1.bb
index 7da662c453..d0943b1941 100644
--- a/meta/recipes-devtools/rust/rust_1.99.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.99.1.bb
@@ -24,6 +24,8 @@ RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
 
 PACKAGECONFIG ??= "llvm-shared"
 PACKAGECONFIG[llvm-shared] = ",,,"
+# Only used by the nativesdk variant; rust-analyzer runs on the SDK host
+PACKAGECONFIG[rust-analyzer] = ",,,"
 
 S = "${RUSTSRC}"
 # Separate build directory from the shared source tree so that multiple
@@ -260,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 = "${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', '${PN}-tools-analyzer ', '', d)}"
 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
@@ -292,6 +298,10 @@ rust_do_install:class-nativesdk() {
     rust_runx install
     rust_runx install clippy
     rust_runx install rustfmt
+    if ${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', 'true', 'false', d)}; then
+        rust_runx install rust-analyzer
+        rust_runx build rust-analyzer-proc-macro-srv
+    fi
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}
@@ -300,6 +310,14 @@ rust_do_install:class-nativesdk() {
         patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
     done
 
+    if ${@bb.utils.contains('PACKAGECONFIG', 'rust-analyzer', 'true', 'false', d)}; then
+        install -d ${D}${libexecdir}
+        cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/rust-analyzer ${D}${bindir}
+        patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/rust-analyzer
+        cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/rust-analyzer-proc-macro-srv ${D}${libexecdir}
+        patchelf --set-rpath "\$ORIGIN/../lib" ${D}${libexecdir}/rust-analyzer-proc-macro-srv
+    fi
+
     chown root:root ${D}/ -R
     rm ${D}${libdir}/rustlib/uninstall.sh
     rm ${D}${libdir}/rustlib/install.log
