Problem
In https://doc.rust-lang.org/cargo/reference/manifest.html, we have:
name = "hello_world" # the name of the package
The same on master: https://github.com/rust-lang/cargo/blob/master/src/doc/src/reference/manifest.md#L12
But the common package name pattern (on crates.io and rest of the community) is to use hyphen-minus, like hello-world, and not underscore (hello_world).
Possible Solution(s)
Assuming that it's not intentional to use underscore (for some system compatibility reason), I think it's better to rename that like to use hyphen-minus.
What do you think?
But the common package name pattern (on crates.io and rest of the community) is to use hyphen-minus, like
hello-world, and not underscore (hello_world).
I don't have pure data, but a casual glance at the front page of https://crates.io/ today actually shows more underscore usage than hyphen-minus (a few crates related to swc_ecma_parser released).
Anyways this changed in https://github.com/rust-lang/cargo/pull/522 and this issue seems duplicate of https://github.com/rust-lang/book/issues/1709. But also here's a few more hyphen-minus vs underscore issues:
Closing as in ok status quo, as explained in rust-lang/book#1709, with a better future tracked in #2775.