WebAssembly & Web Workers Vocabulary

Tip: WASM runs near-native speed in the browser — perfect for CPU-heavy tasks like image processing, video encoding, and cryptography.

0 / 5 completed

Exercise 1 of 5

The frontend engineer says: 'We compile the image processing library from Rust to WebAssembly — it runs at near-native speed in the browser, no server round-trip needed.'

What is WebAssembly (WASM)?

Exercise 2 of 5

The developer explains: 'We moved the PDF generation to a Web Worker — it runs in a separate thread so the UI stays responsive. Workers communicate with the main thread via postMessage.'

Why are Web Workers used?

Exercise 3 of 5

The team architect says: 'We use SharedArrayBuffer with Atomics to share memory between our WASM module and the main thread — no copying, just direct memory access.'

What is SharedArrayBuffer in the context of WASM and Workers?

Exercise 4 of 5

The performance engineer says: 'Our linear memory grows from 16MB to 256MB — we allocate buffers in WASM memory, pass pointers across the JS/WASM boundary, and the GC handles the rest.'

What is WASM linear memory?

Exercise 5 of 5

The engineer says: 'We use wasm-bindgen to generate JavaScript bindings for our Rust WASM module — raw WASM only handles integers, but wasm-bindgen lets us pass strings, objects, and closures.'

What problem does wasm-bindgen solve?