Cargo Compatibility Guarantees?


#1

Hey Rust Devs,

I have a few questions about compatibility guarantees with Cargo:

  1. Does the Cargo.toml file change often?
  2. If so, are they backwards compatible?
  3. Will newer Cargo APIs work with older Cargo.toml files? Will older Cargo APIs work with newer Cargo.toml files?
  4. Also, where in the docs can I find this info if any where?

Thanks in advance,

Abe


#2

The Cargo.toml file changes rarely, and pretty much in an exclusively additive way. There hasn’t been any formal policy adopted about this, and its possible there will be small breaking changes in the future, but you should feel pretty comfortable about the stability of the format in my opinion.


#3

There was a recent change in the TOML parser such that it accepts syntax that was previously not accepted. This new syntax is intended to be used by Cargo. Therefore it is possible that you’ll encounter issues. More details here Deployment timeline of cargo target-specific dependencies


#4

Thanks guys!