summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-09-12 13:27:01 +0200
committerXavier Claessens <xclaesse@gmail.com>2025-10-27 21:14:30 +0100
commitf08a8f94e7c9ed3d4d8cb08c1a23153b6f122819 (patch)
tree82e50a9c69943a2a81b39ca2d6547af673b7cc73 /docs
parent271dbd81c3821c7535056470b52ddbd6f5ada703 (diff)
downloadmeson-f08a8f94e7c9ed3d4d8cb08c1a23153b6f122819.tar.gz
rust: drop +SUFFIX from crate name
Allow multiple targets for the same crate name, which is useful when the same crate is used for both the host and the build machine. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Rust.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index 452dad6e6..67bbdec5b 100644
--- a/docs/markdown/Rust.md
+++ b/docs/markdown/Rust.md
@@ -98,3 +98,11 @@ target is a proc macro or dylib, or it depends on a dylib, in which case [`-C
prefer-dynamic`](https://doc.rust-lang.org/rustc/codegen-options/index.html#prefer-dynamic)
will be passed to the Rust compiler, and the standard libraries will be
dynamically linked.
+
+## Multiple targets for the same crate name
+
+For library targets that have `rust_abi: 'rust'`, the crate name is derived from the
+target name. First, dashes, spaces and dots are replaced with underscores. Second,
+*since 1.10.0* anything after the first `+` is dropped. This allows creating multiple
+targets for the same crate name, for example when the same crate is built multiple
+times with different features, or for both the build and the host machine.