Skip to main content

Crate use_rust_cargo

Crate use_rust_cargo 

Source
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§

CargoDependency
A lightweight dependency description from Cargo.toml.
CargoFeature
A lightweight Cargo feature definition.
CargoManifest
A parsed Cargo manifest.
CargoPackage
A lightweight workspace package description.
CargoWorkspace
A discovered Cargo workspace.
ManifestPath
A UTF-8 Cargo.toml path.
WorkspaceRoot
A UTF-8 Cargo workspace root path.

Enums§

CargoEdition
Known Cargo editions plus a fallback for unknown future values.
CargoManifestError
Errors that can occur while working with Cargo.toml manifests.
CargoWorkspaceError
Errors that can occur while discovering a Cargo workspace.

Functions§

find_manifest
Finds the nearest Cargo.toml relative to a starting path.
find_workspace_root
Finds the nearest Cargo workspace root relative to a starting path.
is_workspace
Returns true when a manifest contains a [workspace] table.
load_manifest
Loads a Cargo.toml manifest 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.