added documentation on how to build wasm packages in the docker container
Nothing big, just an explanation on how to build the wasm package inside the docker container, see here for the bug: https://github.com/mthom/scryer-prolog/issues/3028
What's up with those last five commits (9f79670..7cb231b)?
- breaking
crypto_random_bytefor all targets - unrelated to documentation change this PR is about
- unsigned commits even though the first three are
If you want to be able to disable the ring/wasm32_unknown_unknown_js feature (to reduce the compilation on wasm I presume) that should be placed behind an appropriate feature toggle and the code requiring it (presumably only on wasm32-unknown-unknown targets) should be #[cfg]-ed accordingly.
sorry for that, they just were a personal experiment - they are gone now. I needed to debug a strange bug that occurred while building scryer-prolog to wasm on linux (if not built using clang, the wasm included some imports like (import "env" "ring_core_0_17_14__bn_from_montgomery_in_place" (func (;1;) (type 11))) (import "env" "ring_core_0_17_14__limbs_mul_add_limb" (func (;2;) (type 3))), which caused errors in vote), but that is an upstream bug.
I remember encountering exactly this bug (#2819). You need to have a C compiler that can cross compile to Wasm, because if not then these ring functions can't be compiled and linked. Clang can do that by default, but GCC can't by default and you need a special toolchain. Maybe it would be a good idea to document that (though I kinda remember documenting that already).
I remember encountering exactly this bug (#2819). You need to have a C compiler that can cross compile to Wasm, because if not then these ring functions can't be compiled and linked. Clang can do that by default, but GCC can't by default and you need a special toolchain. Maybe it would be a good idea to document that (though I kinda remember documenting that already).
Thank you - this really annoyed me the last few hours :D But I think this is an upstream bug, I am not yet sure where (somewhere in GCC? wasm-pack? ring? something tells me that this is not rings fault :)), if I have time I will try to triangulate it and report it upstream.
It doesn't seem to be ring's fault, I've already reported to them back them: https://github.com/briansmith/ring/issues/2345.