Proposal: The Rust Platform

I have used “packages” for quite a while now in C++, as the company I worked for had developed its own system, and it worked with a slight difference compared to this proposal.

Instead of having “magical dependencies”, I would propose a new section package:

[packages]
"rust-platform" = "2.3"

[dependencies]
"regex" = "packaged"
"other" = "1.3"

This is slightly different:

  • it makes it clear what is a package and what is a regular crate
  • it makes it explicit what are the dependencies (completely obviating the massive download/compilation issue), and which dependency is versioned by a package or not

There’s also something subtle going on here: it does not let you specify which package the library comes from. I am unclear whether this is good or it would be better to use the package name instead (allowing cherry-picking). It’s not clear how beneficial drawing from multiple packages would be.

It might also be interesting to have a package of “packages”: specifying multiple packages, cherry-picking the needed crates, overriding a few, etc… in order to deliver a curated package for a specific purpose.


Regardless of the rust-platform idea, the idea of packages is very helpful for large organizations. It makes it easier for an organization to cherry-pick versions of crates that work well together and deliver a package of their own for their own developers’ consumption, obviating the need for each team/internal project to repeat this curation/compatibility check work.

3 Likes