From f08a8f94e7c9ed3d4d8cb08c1a23153b6f122819 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 12 Sep 2025 13:27:01 +0200 Subject: 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 --- docs/markdown/Rust.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') 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. -- cgit v1.2.3