Expand description
§vx-dependency
Advanced dependency resolution and management system for vx tools.
This crate provides intelligent dependency resolution with support for:
- Multi-layer dependency chains
- Circular dependency detection
- Version constraint resolution
- Parallel dependency installation
- Caching and performance optimization
§Example
use vx_dependency::{DependencyResolver, ToolSpec, DependencySpec};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut resolver = DependencyResolver::new();
// Register tools and their dependencies
resolver.register_tool(ToolSpec {
name: "yarn".to_string(),
dependencies: vec![
DependencySpec::required("node", ">=16.0.0")
],
..Default::default()
});
// Resolve dependencies for yarn
let resolution = resolver.resolve("yarn").await?;
println!("Install order: {:?}", resolution.install_order);
Ok(())
}
Re-exports§
pub use graph::DependencyGraph;
pub use graph::DependencyNode;
pub use graph::GraphStats;
pub use graph::NodeState;
pub use graph::ResolutionResult;
pub use graph::VersionConflict;
pub use resolver::DependencyResolver;
pub use resolver::ResolutionOptions;
pub use types::DependencySpec;
pub use types::DependencyType;
pub use types::ToolSpec;
pub use types::VersionConstraint;
pub use version::Version;
pub use version::VersionMatcher;
pub use version::VersionRange;
Modules§
- dependency
- Re-exports for convenience
- graph
- Dependency graph representation and algorithms
- resolver
- High-level dependency resolver with caching and optimization
- types
- Core types for dependency resolution
- version
- Version handling and semantic version matching
Enums§
- Error
- Error types for dependency operations
Constants§
- VERSION
- Version information for the crate
Type Aliases§
- Result
- Result type for dependency operations