I'm a little confused by the process. I have a src/main.rs (my project is not a library), but running cargo publish complains:
error: api errors: wildcard (`*`) dependency constraints are not allowed on crates.io. See http://doc.crates.io/faq.html#can-libraries-use--as-a-version-for-their-dependencies for more information
I also don't understand why cargo publish rebuilds my code. Every time I run cargo publish, my project, and all its dependencies, are recompiled! Why is that?
As far as I know, it applies to all packages, not just libraries. It could be a brainfart on the part of the writer, owing to very nearly everything on crates.io being a library.
I think that's a misunderstanding.
Wildcards are forbidden for libraries, but this does not imply they are allowed for executables. At least I couldn't find any docs that explicitly state that this only applies to libraries.
The FAQ from the error message also states that:
Starting January 22nd, 2016, crates.io will begin rejecting packages with wildcard dependency constraints.
(emphasis is mine)
Packages means both, libraries and executables.
But even if wildcards would be allowed, specifying sensible version constraints is still a good idea.