-
Notifications
You must be signed in to change notification settings - Fork 271
Remove std feature from sha1 #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's quite common for Rust crates to have an enabled by default |
The problem is, pest doesn't intend to support no_std. But if Ideally, cargo#4664 would just not exist, but it's been years and there's been no progress. Besides, sha-1 doesn't use any of the features digest std provide. If the user needs them, wouldn't they have to provide |
(FWIW: I also filed a PR to pest: pest-parser/pest#410) |
No, since all hash crates re-export |
Aw, shux, forgot about that. Guess removing std would be a breaking change then, and that's probably not worth the effort. |
Looks like the pest bug got fixed, so I think we can close this issue. |
Why does SHA1 have an on-by-default std feature? It seems to merely forward it to digest, which uses it to activate some traits which aren't actually used by SHA-1? This is a bit of a footgun, since many crates in the ecosystem will accidentally leave it enabled, breaking no_std builds. This is especially the case because of stupid cargo bugs like rust-lang/cargo#4664.
As a practical case: I'm currently having my nostd builds broken because pest (which I use in a proc macro) is using sha1 as a build dependency without deactivating the std feature.
The text was updated successfully, but these errors were encountered: