summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorXavier Claessens <xclaessens@netflix.com>2025-06-08 12:36:45 -0400
committerDylan Baker <dylan@pnwbakers.com>2025-08-01 07:55:49 -0700
commit0cb70e4751cc7f5ea541587c3e0170f08ae450e3 (patch)
tree9e2ca1e13337a83450d6f9e4ef9522064bb96ab9 /docs
parent56e84d35deef8aea2b0beda2ec14ca22334a7f0f (diff)
downloadmeson-0cb70e4751cc7f5ea541587c3e0170f08ae450e3.tar.gz
cargo: Use -rs suffix only for rust ABI
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Wrap-dependency-system-manual.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md
index 73358e7cf..302546ebb 100644
--- a/docs/markdown/Wrap-dependency-system-manual.md
+++ b/docs/markdown/Wrap-dependency-system-manual.md
@@ -322,8 +322,8 @@ foo-bar-1.0 = foo_bar_dep
**Note**: This is experimental and has no backwards or forwards compatibility guarantees.
See [Meson's rules on mixing build systems](Mixing-build-systems.md).
-Cargo subprojects automatically override the `<package_name>-<version>-rs` dependency
-name:
+Cargo subprojects automatically call `override_dependency` with the name
+`<package_name>-<version>-<suffix>`, where every part is defeined as follows:
- `package_name` is defined in `[package] name = ...` section of the `Cargo.toml`.
- `version` is the API version deduced from `[package] version = ...` as follow:
* `x.y.z` -> 'x'
@@ -331,9 +331,10 @@ name:
* `0.0.x` -> '0'
It allows to make different dependencies for incompatible versions of the same
crate.
-- `-rs` suffix is added to distinguish from regular system dependencies, for
- example `gstreamer-1.0` is a system pkg-config dependency and `gstreamer-0.22-rs`
- is a Cargo dependency.
+- the suffix is `-rs` for `rlib` and `dylib` crate types, otherwise it is the
+ crate type (e.g. `staticlib` or `cdylib`). The suffix is added to distinguish
+ Rust crates from regular system dependencies; for example `gstreamer-1.0` is a
+ system pkg-config dependency and `gstreamer-0.22-rs` is a Cargo dependency.
That means the `.wrap` file should have `dependency_names = foo-1-rs` in their
`[provide]` section when `Cargo.toml` has package name `foo` and version `1.2`.