Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 944 Bytes

NOTES.md

File metadata and controls

23 lines (16 loc) · 944 Bytes

Dev Notes

At the moment only the .js and .wasm files generated by emscripten work as es6 modules in node and the browser.

There has been attempts to bundle these files in a higher level js class for convenience, but this doesn't work when trying to bundle say a vue application that consumes the bundled library, it looks like the wasm is not found when webpack is being run twice.

webpack.config.js, js/node.index.js and browser.index.js files are kept in the feat/jswrapper branch for reference and future attempts.

webpack, webpack-cli, @babel/core, @babel/preset-env and babel-loader dev modules should be installed to run new bundling attempts.

The solution might be to write a custom wasm loading JS code. For now the api generated by embind is sufficient.

further reading about wasm library distribution :