cryspen / hpke-rs

Pure Rust implementation of HPKE (https://www.rfc-editor.org/rfc/rfc9180.html)
30 stars 16 forks source link

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

Closed japaric closed 10 months ago

japaric commented 10 months ago

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 commented 10 months ago

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