summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/cargo-workspace-object.md
blob: 1ef767529bf86c272b2cd42dd5fd8d30b15c084e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
## Cargo workspace object

Meson now is able to parse the toplevel `Cargo.toml` file of the
project when the `workspace()` method of the Rust module is called.
This guarantees that features are resolved according to what is
in the `Cargo.toml` file, and in fact enables configuration of
features for the build.

The returned object allows retrieving features and dependencies
for Cargo subprojects, and contains method to build targets
declared in `Cargo.toml` files.

While Cargo subprojects remain experimental, the Meson project will
try to keep the workspace object reasonably backwards-compatible.