4 ms·
That's still 1 to 1.
by pie_flavor 4y ago
That's still 1 to 1.
- LegionMammal978 4y agoNo, multiple packages can (and do) declare the same crate name. For instance, both the "md5" package [0] and "md-5" package [1] declare the "md5" crate. You can even add both of them as a dependency at the same time: you'll only get a compile error when you try to refer to "md5" from the code. So a Cargo package may declare at most one crate name, but this name is not unique. [0] https://crates.io/crates/md5 https://crates.io/crates/md5 [1] https://crates.io/crates/md-5 https://crates.io/crates/md-5
- pie_flavor 4y agoI suppose, but one can also creatively define 'what gets used in the rust file'. If you somehow need to interface with both of those packages, you can say `md_5 = { package = "md-5" }`, and now in your code it will be renamed `md_5`.