Crates.io | cargo-publish-ordered |
lib.rs | cargo-publish-ordered |
version | 0.4.0 |
created_at | 2025-07-06 15:48:40.674604+00 |
updated_at | 2025-07-07 16:51:20.387253+00 |
description | A Cargo plugin to ensure that dependencies are published in a specific order, useful for projects with interdependent crates. |
homepage | https://houseme.github.io/cargo-publish-ordered/ |
repository | https://github.com/houseme/cargo-publish-ordered |
max_upload_size | |
id | 1740212 |
size | 67,999 |
English|简体中文
A Cargo subcommand to publish packages in a Cargo workspace in topological order.
This tool is useful when you have local path dependencies in your workspace. It ensures that dependencies are published before the packages that depend on them, avoiding publishing failures due to missing dependency versions.
Cargo.toml
and parses all packages within the workspace.--dry-run
flag to preview the publishing commands and order without actually publishing
to crates.io.--registry
flag, defaulting to
crates-io
to avoid local configuration issues.cargo publish
commands to publish all packages.Once the project is published to crates.io, you can install it with:
cargo install cargo-publish-ordered
Alternatively, you can install from source:
git clone https://github.com/houseme/cargo-publish-ordered.git
cd cargo-publish-ordered
cargo install --path .
Navigate to your Cargo workspace root directory.
It is recommended to perform a dry run first to check the publishing order and the commands that will be executed:
cargo publish-ordered --dry-run
After confirming the order is correct, execute the publish command. You may need to provide a crates.io token. By
default, this tool publishes to crates-io
.
cargo publish-ordered --token ${CRATES_IO_TOKEN}
If you want to publish to an alternative registry (e.g., a private one), use the --registry
flag:
cargo publish-ordered --token ${MY_REGISTRY_TOKEN} --registry my-private-registry
Contributions of any kind are welcome! If you find a bug or have a feature suggestion, please feel free to create an Issue. If you want to contribute code, please fork the repository and submit a Pull Request.
This project is dual-licensed under Apache-2.0 licenses.