From 4fdc1172b7aada1f3335d28c60bfdc4b01ef7ab8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Nov 2025 11:03:53 +0100 Subject: rust: allow either crate names or target names in the dependency map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 44ce04537 ("cargo: Add library API version into its name", 2025-10-28), the target names provided by cargo subprojects have a suffix corresponding to the library API; for example, the target that used to be "gtk4" is now "gtk4+0_10". This however is an implementation detail, and the change broke rust_dependency_maps that expected to use the crate name. While the target name is preferrable, and will work great when Meson is able to create dependency maps by itself (as is the case for the Cargo interpreter), preserve the old behavior by checking also the entry corresponding to the result of _get_rust_crate_name. Reported-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- docs/yaml/functions/_build_target_base.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/yaml') diff --git a/docs/yaml/functions/_build_target_base.yaml b/docs/yaml/functions/_build_target_base.yaml index dec3d8db0..112953387 100644 --- a/docs/yaml/functions/_build_target_base.yaml +++ b/docs/yaml/functions/_build_target_base.yaml @@ -333,6 +333,8 @@ kwargs: in the `dependencies` section of a Cargo.toml file, or `extern crate gtk4 as gtk` inside Rust code. + *Since 1.10.0*, the keys can be either crate names or target names. + vala_header: type: str description: | -- cgit v1.2.3