Managing multi-crate workspace projects

How do folks manage their multi-crates-in-one workspace projects?

I'm looking for a way to automate bulid / release pipeline and although it seems like there are some pieces I can use to build my own release process (like, seems to support workspaces now), I would like to see how others do it.

I don't see any anything in any of the projects I looked at (serde, regex, etc). Do people just have their own private shell scripts? Hidden instructions? Or just run cargo publish manually, then edit Cargo.tomls by hand? Am I missing something obvious?

I'm specifically looking for experience of those who maintain these kind of repositories.

Having to edit Cargo.tomls by hand simply doesn't scale to large workspaces in my opinion.

  • tokio has a good dozen crates. I see they have scripts for managing the workspace here:

  • I recall seeing some opinionated alternative to libstd that I think boasted some 40+ crates, but I can't seem to find it or even remember its name now. (I only recall that it had a major focus on fallable allocation). That project surely has some homegrown scripts.

  • In my research code I have a workspace with about 24 crates. Even though it's not something that I would ever publish on (so I don't need to worry about versions of same-workspace crates), it is pretty painful to get path dependencies right (especially when I move things around) or to ensure that I don't link to eleven different versions of itertools. So I wrote a small python script which slowly grew over time into this abomination.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.