This PR makes several changes to how the WASM module in this library is generated.
The WASM outputted by wasm-pack now defaults to a web compatible ES module and esm is used to translate this to Commonjs that is capable of being consumed by NodeJS.
The default serving/loading of the WASM in web environments is now a more efficient style of loading that does not involve bas64 encoding the WASM reducing bloat.
support for NodeJS 10 which is now EOL has had to be dropped due in compatibility with TextEncoder/TextDecoder that is used in the translated ES module.
Support for ASM.js has now been dropped due to:
It being incredibly slow
It significantly bloating the package size
Complicating the module loading logic
Support for WASM in browser is ever-improving and for those wanting to use the package in RN environments should be consuming it via a native module.
[x] Tests for the changes have been added (for bug fixes / features)
Description
This PR makes several changes to how the WASM module in this library is generated.
The WASM outputted by wasm-pack now defaults to a web compatible ES module and esm is used to translate this to Commonjs that is capable of being consumed by NodeJS.
The default serving/loading of the WASM in web environments is now a more efficient style of loading that does not involve bas64 encoding the WASM reducing bloat.
support for NodeJS 10 which is now EOL has had to be dropped due in compatibility with TextEncoder/TextDecoder that is used in the translated ES module.
Support for ASM.js has now been dropped due to:
[x] Tests for the changes have been added (for bug fixes / features)
[x] The commit message(s) follow conventional commits
[x] Documentation has been added / updated (for bug fixes / features)
[x] Changes follow the contributing document.
Motivation and Context
See above
Does this PR introduce a breaking change?
Which merge strategy will you use?