|
@ -13,4 +13,4 @@ emcc -lembind -o test.js test.cpp -s NO_EXIT_RUNTIME=1 -s "EXPORTED_RUNTIME_METH |
|
|
- When the HTML page is loaded, **test.js** is executed, loading the WebAssembly module , Emscripten's Module object is |
|
|
- When the HTML page is loaded, **test.js** is executed, loading the WebAssembly module , Emscripten's Module object is |
|
|
created, exposing the C++ functions (like myFunction) to JavaScript |
|
|
created, exposing the C++ functions (like myFunction) to JavaScript |
|
|
|
|
|
|
|
|
- Example of using **Module**: var result = Module.myFunction(input) |
|
|
|
|
|
|
|
|
- [Example](https://git.pranger.xyz/varnicas/testingwasm/src/branch/main/index.js#L3) of using **Module**: var result = Module.myFunction(input) |