Closed vmx closed 2 years ago
@Anderssorby you might be interested in a review as you did the original WASM support.
@samuelburnham you might be interested in a review as you recently opened a PR for WASM on a related project.
I think this is a great change, however in https://github.com/lurk-lang/bellperson/tree/sb/wasm I go further to remove the memmap
feature entirely and instead conditionally compile on the wasm32
target (which could be extended with other targets in the future). This would simplify downstream imports of this crate so they don't have to disable default features.
Thanks @samuelburnham, that's a great recommendation. I cherry-picked your change and incorporated it. Now it's even cleaner.
Who needs to sign off on this? @shawnrader @cryptonemo ?
@lemmih sorry for the delay and thanks for the ping.
The
wasm
feature was introduced asgetrandom
needs thejs
feature in order to compile forwasm32-unknown-unknown
. A better fix is to disable the default features ofrand
instead. This way thewasm
feature is no longer needed.For compiling on WebAssembly also the
memmap
feature was introduced. Remove that feature and replace it with target architecture flags, that exclude memmap related functions when compiled for wasm.This lowers the maintenance burden as WebAssembly is no longer a special case.
Thanks @samuelburnham for the code that made the removal of
memmap
feature possible.BREAKING CHANGE:
wasm
andmemmap
features are removedIf you're targetting WASM and using
bellperson
as a dependency, prior to this change you'd have included it as:Now you can instead just rely on the default features:
BREAKING CHANGE: resolver v2 is used
In order to make things compile nicely for the wasm target, the resolver was changed to version 2.
This should be merged once we decide that we want to do a new breaking change version.