I am creating a library, that is nearly close to its first release, so I would like to upload it to crates.io
. Library has a multi-crate design, so I ended with something like:
- CrateA
- CrateProcMacros
- CrateC
- CrateD
- CrateE
- CrateF
- Cargo.toml (handles the workspace)
- Cargo.lock
...
where CrateA
is the parent of the other crates, and has dependencies on another of those local crates, and some of those crates also depends on another ones. I mean, it's the primary crate of the library, the one responsible for exposing the public API of the project, and the unique one that I would like to be published in crates.io
.
Reading the cargo docs I am seeing that I won't be able to publish a unique crate to the registry. All will be uploaded and published.
So, what alternatives I have to only publish my CrateA
to the registry? Should I change my project's structure, and move to CrateA
all the other packages and then try to publish it? Or there's some way to achieve this?
EDIT
CrateA
have direct dependencies on another crates. An those others also depends on another one inside my workspace.