You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey. I started a plugin, wasmify, for importing WebAssembly code. I wanted to share my progress. 馃槃
Firstly, you can run this with or without a config. Without simply lets you import .wasm files. While configs are responsible for compiling source files (C, C++, etc.) into webassembly and loading it at runtime.
constcreateSample=require('./sample.wasm')// Initialize moduleconstsample=createSample({ ...imports})// Run WebAssembly functionsample.main()
And here is an example using an Emscripten config:
constsample=require('./sample.c')// Call C functionsample._main()
I hope to add better C/C++ support in the future, as well as configs for other languages. Currently emscripten (for C/C++) and wabt (for WAT) are supported.
Activity