import "./hello.js";Compiling a new C/C++ module to WebAssembly / notebook
Compiling a new C/C++ module to WebAssembly
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
import createModule from "./hello.mjs";
createModule().then((Module) => {
console.log("Wasm ready", Module);
}); <button id="my-button">Run myFunction</button> document.getElementById("my-button").addEventListener("click", () => {
alert("check console");
const result = Module.ccall(
"myFunction", // name of C function
null, // return type
null, // argument types
null, // arguments
);
});