summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-10-17 14:45:07 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-12-22 11:58:30 +0100
commit646593856800c55f44fe2b15991570737709a36e (patch)
treefca53f863fa98c9e3053d2285681f3e7dc5b7adc /docs
parentd1ea846b6bbb5cbf09d8e9707707c40af3cf7c92 (diff)
downloadmeson-646593856800c55f44fe2b15991570737709a36e.tar.gz
rust: add rust.workspace() skeleton implementation
rust.workspace() is the entry point for global feature resolution. It loads a Cargo.toml file and ensures that all dependencies will be built with the correct set of features. Fixes: #13404 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Rust-module.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md
index 5ce0fdcdb..64c4c2311 100644
--- a/docs/markdown/Rust-module.md
+++ b/docs/markdown/Rust-module.md
@@ -4,6 +4,9 @@ authors:
- name: Dylan Baker
email: dylan@pnwbakers.com
years: [2020, 2021, 2022, 2024]
+ - name: Paolo Bonzini
+ email: bonzini@gnu.org
+ years: [2025]
...
# Rust module
@@ -168,3 +171,22 @@ Only a subset of [[shared_library]] keyword arguments are allowed:
- link_depends
- link_with
- override_options
+
+### workspace()
+
+```
+cargo_ws = rustmod.workspace()
+```
+
+*Since 1.11.0*
+
+Create and return a `workspace` object for managing the project's Cargo
+workspace.
+
+A project that wishes to use Cargo subprojects should have `Cargo.lock` and `Cargo.toml`
+files in the root source directory, and should call this function before using
+Cargo subprojects.
+
+The first invocation of `workspace()` establishes the *Cargo interpreter*
+that resolves dependencies and features for both the toplevel project (the one
+containing `Cargo.lock`) and all subprojects that are invoked with the `cargo` method,