Node.js 12.3: WebAssembly Experimental Support for Wasm Modules

Node.js 12.3. is here to provide experimental support for the WebAssembly ES-Modules integration. With this, Node follows the current trend: Everyone is counting on WebAssembly!

Node.js: WebAssembly support

WebAssembly is gradually arriving in the JavaScript world. Also Node.js has now implemented a first support for Wasm modules with the release of v12.3. But the feature is still behind a flag: –experimental-wasm-modules. The Wasm Modules is an integration of the ES Modules into the Wasm standard, which is currently still in Phase 1 of standardization. The aim of the Proposals is that Wasm modules can be loaded into JavaScript via an import statement or < script type=module > tag. The integration semantics in Node.js 12.3 are the same as proposed in the WebAssembly proposal, as Guy Bedford explains in the corresponding pull request on GitHub .

Notable changes

esm:

  • Added the –experimental-wasm-modules flag to support WebAssembly modules (Myles Borins & Guy Bedford) #27659

process:

  • Log errors using util.inspect in case of fatal exceptions (Ruben Bridgewater) #27243

repl:

  • Add process.on(‘uncaughtException’) support (Ruben Bridgewater) #27151

stream:

  • Implemented Readable.from async iterator utility (Guy Bedford) #27660

tls:

  • Expose built-in root certificates (Ben Noordhuis) #26415
  • Support net.Server options (Luigi Pinca) #27665
  • Expose keylog event on TLSSocket (Alba Mendez) #27654

worker:

  • Added the ability to unshift messages from the MessagePort (Anna Henningsen) #27294

Node.js 12.3 also brings some more new features and bug fixes, which can be found in the Release Notes on the Node Blog. These include, for example, the new utility method Readable.from , which converts async iterators into readable streams.

LEAVE A REPLY

Please enter your comment!
Please enter your name here