rust - Cargo dependency version syntax -


is there page documenting different cargo syntax dependencies? far have seen three...

[dependencies] crate = "1.0.0"  # think exact version match crate = "^1.0.0" # think means "use latest 1.x.x" crate = "*"      # think means "use latest" 

i'd love know how use dependency list. thanks!

see crates.io documentation page on "specifying dependencies". summarise:

  • nothing or caret (^) means "at least version, until next incompatible version".

  • a tilde (~) means "at least version, until (but excluding) next minor/major release". is, ~1.2.3 accept 1.2.x x @ least 3, ~1.2 accept 1.2.*, , ~1 accept 1.*.*.

  • a wildcard (*) means "anything looks this". is, 1.2.* accept 1.2.anything (1.2.0, 1.2.7-beta, 1.2.93-dev.foo, etc. not 1.3.0).

  • inequalities (>=, >, <, =) mean obvious: version cargo uses must satisfy given inequality.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -