From 9752def1c96eb32dc37c32398a0fe8802392fbc9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 22 Oct 2025 16:52:08 +0200 Subject: modules: rust: implement more package accessors Signed-off-by: Paolo Bonzini --- docs/markdown/Rust-module.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'docs') diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md index 99faeecfe..fbe65f1b6 100644 --- a/docs/markdown/Rust-module.md +++ b/docs/markdown/Rust-module.md @@ -258,6 +258,47 @@ Positional arguments: The package object returned by `workspace.subproject()` provides methods for working with individual packages in a Cargo workspace. +### subproject.name() + +```meson +name = pkg.name() +``` + +Returns the name of the subproject. + +### subproject.version() + +```meson +version = pkg.version() +``` + +Returns the normalized version number of the subproject. + +### subproject.api() + +```meson +api = pkg.api() +``` + +Returns the API version of the subproject, that is the version up to the first +nonzero element. + +### subproject.features() + +```meson +features = pkg.features() +``` + +Returns selected features for a specific subproject. + +### subproject.all_features() + +```meson +all_features = pkg.all_features() +``` + +Returns all defined features for a specific subproject. + ### subproject.dependency() ```meson -- cgit v1.2.3