Skip to main content

Module cargo

Module cargo 

Source

Structsยง

CargoBuilder
Runs cargo build --release and returns the produced artifacts.
CargoBuilderConfig
Configuration for CargoBuilder.
CargoDocBuilder
Runs cargo doc and returns the whole doc directory as an artifact.
CargoDocBuilderConfig
Configuration for CargoDocBuilder.
CargoMessage ๐Ÿ”’
Minimal representation of the JSON messages emitted by cargo build --message-format=json.
CargoMessageTarget ๐Ÿ”’

Functionsยง

default_parallel ๐Ÿ”’
get_host_target ๐Ÿ”’
Query rustc -vV and return the host target triple (e.g. "x86_64-unknown-linux-gnu").
line_bridge ๐Ÿ”’
Creates a plain-string sender whose lines are mapped through f and forwarded to log. This lets run_cargo_build (which only knows about strings) feed into the structured LogSender without depending on LogEvent directly.
read_crate_version ๐Ÿ”’
Read [package].version from the Cargo.toml at manifest_path (defaults to Cargo.toml in the current directory).
relocate_artifacts ๐Ÿ”’
Copy each artifact from its path inside tmp_root to the corresponding path under target/, creating parent directories as needed, and return updated ArtifactPaths pointing at the new stable locations.
run_cargo_build ๐Ÿ”’
Spawn cargo build --release --message-format=json [--target <triple>] [--manifest-path <path>] and collect every artifact path from the compiler-artifact messages.