Any1 ever import wasm in package to meteor(using emcripten)

Then, we could call C funtions from client javascript?
C/C++ library compiled to lib.html, lib.js,lib.wasm by emcc.

Any solution?

just test but not end.

  1. emcc -o test.html test.cc
  2. package.js: api.addFile(’[loader.js,test.js]’,client);
  3. cp test.wasm to public/packages
  4. Now need the loader.js

any help?

Ok, simple way, not the one. Not need loader.js (but would be better soultion). Just comment out all test.js errors.

1 Like