Basics of WebAssembly (Wasm)

$ Free (Draft Edition)
This micro-course is designed for beginners who want to learn the fundamentals of WebAssembly (Wasm), a low-level binary format that runs in web browsers and provides near-native performance. In three lessons, you will learn how to create and run simple Wasm modules, how to call Wasm functions from JavaScript, and how to interact with the browser's Web APIs from Wasm code.
Updated:

Lesson 1: Getting Started with Wasm

  • Introduction to Wasm and its benefits
  • Setting up a development environment for Wasm
  • Writing a simple Wasm module in C or Rust
  • Compiling your module to Wasm binary format
  • Running your module in Node.js

Lesson 2: Bridging Wasm with JavaScript and Browser's Web APIs

  • Instantiating and Loading Wasm Modules in JavaScript
  • Data Types and Conversions
  • Asynchronous communication using Web Workers
  • How to import and use Web API functions in Wasm
  • Using Wasm to manipulate the DOM and handle events

Lesson 3: Understanding Wasm Modules (Upcoming)

  • Anatomy of a Wasm Module: A closer look
  • Understanding Wasm Functions: Declaration, Import, and Export
  • Memory in Wasm: Management and Best Practices
  • Tables in Wasm: Purpose and Usage