Expand description
Stable crate alternative for cargo artifact dependency.
Warning: This crate currently only supports binary artifacts. If you need other artifact types, please open an issue on github.
§Why
Cargo artifact dependencies are still an unstable Cargo feature and may still have bugs. This crate exists as a temporary alternative while artifact dependency support remains unstable.
Use ArtifactDependencyBuilder to describe a dependency and call
ArtifactDependency::resolve to resolve its artifact path.
§Notes
This crate does not emulate Cargo.toml’s full version + path dependency
resolution semantics. If you need a local development path, you can gate
.path(...) behind a feature.
§Example
use cargo_artifact_dependency::{ArtifactDependencyBuilder, BuildProfile};
// Describe the ripgrep dependency and resolve its artifact.
let artifact_path = ArtifactDependencyBuilder::default()
.crate_name("ripgrep")
.version("^14")
.bin_name("rg")
.profile(BuildProfile::Release)
.build()
.unwrap()
.resolve()?;
// Use the resolved artifact path in your own workflow.
println!("{}", artifact_path.display());Structs§
- Artifact
Dependency - Describes an artifact dependency.
- Artifact
Dependency Builder - Builder for
ArtifactDependency.
Enums§
- Artifact
Dependency Builder Error - Error type for ArtifactDependencyBuilder
- Build
Profile - Error
- Errors returned while resolving an artifact path.
Type Aliases§
- Result
- Convenience result type for this crate.