Loading...
Loading...
Build Output
Example Usage
      Download the generated JS and wasm files and place it in your project directory
  • Add a <button> element as shown below, just above the first opening <script>
  • <button id="mybutton">Run myFunction</button>

  • Now add the following code at the end of the first <script> element:
  • 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