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

getrandom's "js" feature should not be enabled in libraries #51

Closed
japaric opened this issue Nov 24, 2023 · 1 comment · Fixed by #53
Closed

getrandom's "js" feature should not be enabled in libraries #51

japaric opened this issue Nov 24, 2023 · 1 comment · Fixed by #53

Comments

@japaric
Copy link
Contributor

japaric commented Nov 24, 2023

getrandom's docs state:

This feature should only be enabled for binary, test, or benchmark crates. Library crates should generally not enable this feature, leaving such a decision to users of their library. Also, libraries should not introduce their own js features just to enable getrandom’s js feature.

currently the hpke-rs-crypto, hpke-rs-evercrypt and hpke-rs-rust-crypto libraries are enabling the "js" feature. if the feature is desired to, for example, run benchmarks on wasm32-unknown-unknown then the getrandom dependency should be moved under the dev-dependecies section so that only benchmark binaries see it.

@franziskuskiefer
Copy link
Member

Indeed. This was laziness on my side and it didn't hurt so far. I'd be fine with removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants