Skip to content

JakkuSakura/Magnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magnet CLI Tool

Magnet is a CLI tool for managing Magnet.toml project configuration files, designed to enhance the Cargo workspace experience with a super-workspace concept.

Features

  • 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

Installation

cargo install --path ./crates/magnet

Usage

Initialize a new Magnet.toml

magnet init [path]

Generate Cargo.toml from Magnet.toml

magnet generate [--config Magnet.toml]

Check Magnet.toml for issues

magnet check [--config Magnet.toml]

List all crates in the super-workspace

magnet list [--config Magnet.toml]

Example 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"

License

MIT License

About

Magnet Brings Ferris Together

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages