Magnet is a CLI tool for managing Magnet.toml project configuration files, designed to enhance the Cargo workspace experience with a super-workspace concept.
- Super-workspace management: Define workspace members and dependencies in a Magnet.toml file
- Path-based dependency resolution: Automatically replace references to crates in the super-workspace with path-based dependencies
- Cargo.toml generation: Generate Cargo.toml files from Magnet.toml configurations
- Workspace validation: Check for inconsistencies between Magnet.toml and Cargo.toml files
cargo install --path ./crates/magnet
magnet init [path]
magnet generate [--config Magnet.toml]
magnet check [--config Magnet.toml]
magnet list [--config Magnet.toml]
[project]
name = "my-project"
version = "0.1.0"
description = "My awesome Rust project"
authors = ["Your Name <[email protected]>"]
[workspace]
members = ["crates/*"]
exclude = []
resolver = "2"
# Dependencies shared across the workspace
[dependencies]
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
# Development dependencies shared across the workspace
[dev-dependencies]
criterion = "0.5"
MIT License