matter-labs-archive / sapling-crypto

Zcash "Sapling" cryptography gadgets along with additions. Uses our Ethereum compatible bellman under the hood
Other
15 stars 9 forks source link

rust-crypto dependency prevents compiling to wasm #11

Closed Schaeff closed 4 years ago

Schaeff commented 4 years ago

rust-crypto doesn't compile to wasm due to the outdated rustc-serialize dependency.

There are fixes at different levels:

Our quick fix is here but we want to avoid forking this repo.

What approach would you prefer?

shamatar commented 4 years ago

I think that rust-crypto is only used for SHA256, so may be it's worth to replace it all together with something more lightweight like this? Otherwise I'd switch to rust-crypto-wasm for now, but it still takes all the libc together with it.

dark64 commented 4 years ago

I think that rust-crypto is only used for SHA256, so may be it's worth to replace it all together with something more lightweight like this? Otherwise I'd switch to rust-crypto-wasm for now, but it still takes all the libc together with it.

I made a pull request regarding this issue https://github.com/matter-labs/sapling-crypto/pull/12 @shamatar

shamatar commented 4 years ago

Thank you @dark64 ! @Schaeff would you try to check PR #12 against you WASM target?

Schaeff commented 4 years ago

Hey @shamatar yes everything works fine for us with this change!

shamatar commented 4 years ago

Version 0.1.1 should be now on crates.io. If it's good then please close this issue

Schaeff commented 4 years ago

Very good thanks!