rozbb / rust-hpke

An implementation of the HPKE hybrid encryption standard (RFC 9180)
Other
62 stars 31 forks source link

Initial changes to get `wasm-pack build` to succeed #22

Closed jbr closed 2 years ago

jbr commented 2 years ago

I do not yet have high confidence that this is the sufficient, but I do believe these changes are necessary. getrandom is currently a transitive dep, but we need to enable the js feature. I believe 1.60 has some special support for this, but in order to keep the msrv as is, I just added a direct dependency on getrandom when the wasm feature is enabled.

closes #21 (?)

Thanks!

rozbb commented 2 years ago

Thanks for this! Just two things:

  1. Could you pin getrandom to the minor version 0.2 rather than the patch version 0.2.6?
  2. Would you be able to extend the Github Action that builds and tests the library to do WASM compilation? I figure it's just an extra few lines somewhere in .github/workflows/ci.yml but I don't know how to do it myself
jbr commented 2 years ago

With some further exploration, it likely does not make sense to directly consume this crate from wasm, but instead to wrap this crate with another that exposes a simplified (non-generic) interface. Thanks!