We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include <emscripten.h> #include <emscripten/bind.h> void performWork() { int *i = new int; } int main(){ return 0; } EMSCRIPTEN_BINDINGS(panda) { emscripten::function("performWork", &performWork); }
emcc -lembind -o panda.wasm panda.cpp
Error loading WASM: TypeError: WebAssembly.instantiate(): Import #0 "env": module is not an object or function
The text was updated successfully, but these errors were encountered:
EMSCRIPTEN_BINDINGS is a way to connect JS and wasm. It will not work with a pure wasm application.
You can use lower-level ways to call into the wasm, if you don't need/want JS. Just using EMSCRIPTEN_KEEPALIVE is enough:
https://emscripten.org/docs/api_reference/emscripten.h.html#compiling
Sorry, something went wrong.
No branches or pull requests
emcc -lembind -o panda.wasm panda.cpp
Error loading WASM: TypeError: WebAssembly.instantiate(): Import #0 "env": module is not an object or function
The text was updated successfully, but these errors were encountered: