-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Right now there are several checks done by cargo publish
. Unfortunately there isn't a concise list of the necessary requirements for publishing a crate. The only way to tell is cargo publish
or cargo publish --dry-run
. The latter is harder to discover. And once you detect and error, it could take a while to fix (like if you're using unversioned dependencies).
There are also higher-level best-practices that could be described to the user that they should follow. Ideally all of these would be checkable via lints within cargo itself. Some examples:
- Check that there isn't a
use_*
feature where*
is an existing crate name with underscores (from this issue) - That the crate has a
std
feature if this crate could expose functionality that made sense in ano_std
environment.
Ideally this would be something that would be part of the publishing process for the first version of a crate and then could also be part of cargo publish --dry-run
as a check in the future. I don't know if cargo checklist
is a good name for this or it could all be contained within the cargo publish
command.