Chapter 10. WebAssembly modules in Node.js

 

This chapter covers

  • Loading a WebAssembly module using Emscripten’s generated JavaScript code
  • Using the WebAssembly JavaScript API to load a WebAssembly module
  • Working with WebAssembly modules that call into JavaScript directly
  • Working with WebAssembly modules that use function pointers to call into JavaScript

In this chapter, you’ll learn how to use WebAssembly modules in Node.js. Node.js has some differences compared with a browser—for example, having no GUI—but, when working with WebAssembly modules, there are a lot of similarities between the JavaScript needed in a browser and in Node.js. Even with these similarities, however, it’s recommended that you test your WebAssembly module in Node.js to verify that it works as expected on the versions that you want to support.

Definition

Node.js is a JavaScript runtime built on the V8 engine—the same engine that powers the Chrome web browser. Node.js allows for JavaScript to be used as server-side code. It also has a large number of open source packages available to help with many programming needs. For a book dedicated to teaching you about Node.js, see Node.js in Action, Second Edition (Manning): www.manning.com/books/node-js-in-action-second-edition.

10.1. Revisiting what you know

 

10.2. Server-side validation

 
 

10.3. Working with Emscripten-built modules

 
 
 

10.4. Using the WebAssembly JavaScript API

 
 

Real-world use cases

 
 

Exercises

 
 

Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest