Is there a page documenting the different Cargo syntax for dependencies? So far I have seen three...
crate = "1.0.0" # I think this is an exact version match
crate = "^1.0.0" # I think this means "use that latest 1.x.x"
crate = "*" # I think this means "use the latest"
I'd love to know for certain how to use the dependency list. Thanks!
Best How To :
crates.io documentation page on "Cargo and crates.io". To summarise:
Nothing or a caret (
^) means "at least this version, until the next incompatible version".
A tilde (
~) means "at least this version, until (but excluding) the next minor/major release". That is,
~1.2.3 will accept
X is at least 3,
~1.2 will accept
~1 will accept
A wildcard (
*) means "anything that looks like this". That is,
1.2.* will accept
1.2.93-dev.foo, etc. but not
=) mean the obvious: the version Cargo uses must satisfy the given inequality.