Build Output
Example Usage
- Add a <button> element as shown below, just above the first opening <script>
- Download the generated JS and wasm files and place it in your project directory
<button id="mybutton">Run myFunction</button>document.getElementById("mybutton").addEventListener("click", () => {
alert("check console");
const result = Module.ccall(
"myFunction", // name of C function
null, // return type
null, // argument types
null, // arguments
);
});For more information on how to use the generated Webassembly and JS code, pleaser refer : MDN Webassembly