Skip to content
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

Issues with the std feature #10

Closed
est31 opened this Issue Nov 25, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@est31
Copy link

est31 commented Nov 25, 2017

I have two issues with the std feature:

  1. it is turned off by default. You have to turn it on manually. While optional no_std support is great, I think more people have std than have no_std, so I think it should be a default enabled feature.
  2. the hasher crates don't expose the std features themselves. So there is no real way of enabling it except depending on the digest trait yourself and enabling it :/.

I'm not a fan of all of the api guidelines, but this issue is well described by them: https://github.com/rust-lang-nursery/api-guidelines/blob/5ac0bd004341f6d90f43cd7c325fe845e904c477/src/naming.md#feature-names-are-free-of-placeholder-words-c-feature

@newpavlov

This comment has been minimized.

Copy link
Member

newpavlov commented Nov 25, 2017

I thought about making std default feature, but decided against it, as it infects all downstream crates with default-features = false and digest/std features. I don't think that one additional string in the Cargo.toml for crate users when they need std::io functionality outweighs increased complexity for no_std crates.

@tarcieri
Your opinion?

@tarcieri

This comment has been minimized.

Copy link

tarcieri commented Nov 27, 2017

I'm ok with an enabled-by-default std feature, so long as the API itself doesn't gain important functionality that requires std

@newpavlov

This comment has been minimized.

Copy link
Member

newpavlov commented Oct 2, 2018

Fixed with digest v0.8. Now std feature is enabled by default for hash crates, but still disabled by default for digest crate.

@newpavlov newpavlov closed this Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.