Ghi chú phát hành được viết bằng tiếng Anh.
WebAssembly modules can call JavaScript
A named floor falls: WebAssembly JS-import callbacks. The engine has run real compiled wasm modules since 0.1.134, but a module that IMPORTED a JavaScript function - the way nearly every real wasm module talks to its page - could not call it, because the wasm call path ran as a plain native that cannot re-enter the JavaScript engine. The wasm call is now an interpreter intrinsic: when a module invokes an imported function, the engine re-enters its own VM, runs the page-supplied JavaScript function with the wasm arguments, and coerces the return value back to the import's declared wasm type. A JavaScript exception thrown by the import surfaces as itself to the wasm caller's catch block, not a stringified copy. Verified against the reference runtime's WebAssembly as the independent reference, end to end from page JavaScript. Also in this release: the protocol layer's awaitPromise now advances the page's event loop while it waits, so an automation waitForSelector finds an element the page inserts later - the thirteenth probe step. Web APIs moves 62 to 63; the overall holds at 57.
Những gì đã thay đổi
4 thay đổi- Hiển thịWasm-to-JS calls run through a host driver passed per call, not stored callbacks - the driver captures the JS VM mutably and re-enters it, which is the piece a plain native could never do. Arguments arrive as numbers matching the wasm values; the JS return value is coerced to the import's declared result type; an import with no supplied function still instantiates and errors honestly only when actually called.
- JavaScript và JITProven end to end from page JavaScript against the reference JavaScript runtime as the reference: a module importing env.add10 computes add10(x)*2, and the page sees 30 and 42 for runs of 5 and 11 with the import observing exactly those arguments. A throwing import surfaces its own Error to the caller. Three new integration tests plus a driver-level unit test.
- DevToolsThe DevTools protocol's awaitPromise now pumps the page's event loop (due timers, injected scripts, microtasks) between settlement checks, so a promise that resolves through page activity - a wait-for-selector poller watching for an element a setTimeout will insert - settles instead of timing out. The live Puppeteer probe grows to thirteen steps, all green.
- Hiển thịHonest limits, stated plainly: imported memories are allocated locally rather than shared, and imported globals and tables are tolerated by the decoder but not yet modeled - the common env function-import shape works; full emscripten interop is the remaining tail.

















