Expand description
§use-rust-cargo
Composable Cargo project and workspace primitives for RustUse.
use-rust-cargo provides typed helpers for finding manifests, reading Cargo metadata, and inspecting local Cargo workspaces.
§Example
use use_rust_cargo::find_manifest;
let manifest = find_manifest(".")?;
println!("{}", manifest);Composable Cargo project and workspace primitives.
Structs§
- Cargo
Dependency - A lightweight dependency description from
Cargo.toml. - Cargo
Feature - A lightweight Cargo feature definition.
- Cargo
Manifest - A parsed Cargo manifest.
- Cargo
Package - A lightweight workspace package description.
- Cargo
Workspace - A discovered Cargo workspace.
- Manifest
Path - A UTF-8
Cargo.tomlpath. - Workspace
Root - A UTF-8 Cargo workspace root path.
Enums§
- Cargo
Edition - Known Cargo editions plus a fallback for unknown future values.
- Cargo
Manifest Error - Errors that can occur while working with
Cargo.tomlmanifests. - Cargo
Workspace Error - Errors that can occur while discovering a Cargo workspace.
Functions§
- find_
manifest - Finds the nearest
Cargo.tomlrelative to a starting path. - find_
workspace_ root - Finds the nearest Cargo workspace root relative to a starting path.
- is_
workspace - Returns
truewhen a manifest contains a[workspace]table. - load_
manifest - Loads a
Cargo.tomlmanifest from a file or directory path. - package_
names - Returns workspace package names from a starting path.
- publishable_
packages - Returns publishable workspace packages from a starting path.
- workspace_
members - Returns workspace members from a starting path.