[][src]Crate cargo_workspace2

cargo-workspace2 is a library to help manage cargo workspaces

Out of the box the cargo workspace experience leaves a lot to be desired. Managing a repo with many crates in it can get out of hand quickly. Moreover, other tools that try to solve these issues often pick one particular usecase of cargo workspaces, and enforce very strict rules on how to use them.

This library aims to solve some of the issues of dealing with workspaces in a way that doesn't enforce a usage mode for the user.

This package also publishes a binary (cargo ws2), which is recommended for most users. In case the binary handles a use-case you have in a way that you don't like, this library aims to provide a fallback so that you don't have to re-implement everything from scratch.

Using this library

Parsing happens in stages. First you need to use the cargo module to parse the actual Cargo.toml files. After that you can use the cargo models in models to further process dependencies, and create a DepGraph to resolve queries and make changes.



A set of models directly related to Cargo.toml files


Collection of cargo workspace data models.


Atomic operations on a cargo workspace


Parse the query language for the CLI and other tools