Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A ground-up guide to WebAssembly that connects the technology's history, its stack-machine internals, and the LLVM/Emscripten toolchain to real, buildable applications. Best for front-end developers and C/C++ programmers who want to understand *why* Wasm works, not just how to call it.
【Book Arc】
- **Opening (~0%–15%)**: Sets up the "big front-end" convergence and traces the lineage from PNaCl and ASM.js to WebAssembly, using performance comparisons and simple demos to explain why earlier approaches failed.
- **Early (~15%–31%)**: Introduces the standard upper-level JavaScript API — module compilation, instantiation, tables, memory, and error types — alongside the first hands-on Wasm examples.
- **Middle (~31%–62%)**: Dives into the stack-machine design: RPN evaluation, the data/type stacks, structured control flow, binary encoding (LEB-128, OpCodes, sections), linear memory and addressing, plus ELF-style dynamic linking and SIMD.
- **Late (~62%–77%)**: Moves to tooling — LLVM-IR, Clang/llc, WAT text format, and a from-scratch static compiler for a toy language — then introduces the Emscripten toolchain and its runtime environment.
- **Ending (~77%+)**: Applies Emscripten to C/C++ binding, virtual file systems, WebGL, optimization, and HTML5 events, culminating in a business-value application and a look at the Post-MVP roadmap.
【Key Takeaways】
- **Wasm is a portable, sandboxed binary format, not a language** (Opening): it targets near-native speed across CPU architectures, unlike architecture-specific NaCl/PNaCl.
- **The stack machine is the conceptual core** (Middle): RPN expressions, data/type stacks, and structured control flow (block/if/br) explain how Wasm validates and executes safely.
- **Binary encoding matters** (Middle): LEB-128, section structures, and OpCodes determine module size and load speed — understanding them demystifies the format.
- **Dynamic linking is table-based** (Middle): Wasm simulates a simplified GOT/PLT via the Table segment and `call_indirect`, since it cannot use ELF-style linking directly.
- **LLVM is the bridge from C/C++ to Wasm** (Late): LLVM-IR, Clang, and `llc` (with wasm32/wasm64 targets) form the compilation backbone.
- **Emscripten is the practical toolkit** (Late): emcc, the runtime environment, ccall/cwrap bindings, and virtual file systems let existing C/C++ code run in the browser with minimal changes.
- **Real applications require more than compilation** (Ending): WebGL, file system choices (MEMFS/IDBFS/NODEFS), optimization, and event handling are needed for production value.
- **The ecosystem is still evolving** (Ending): Post-MVP plans cover DOM, threads, and GC, so readers should track updates rather than treat the book as final.
【Reading Tips】
- Deep-read the stack-machine and binary-encoding chapters (Middle) — they are the intellectual core and hardest to skim.
- Skim the historical PNaCl/ASM.js narrative (Opening) if you already know the background; focus on the performance comparisons.
- Treat the LLVM/Emscripten chapters (Late) as a hands-on lab: build the examples rather than only reading them.
- Note the author's caveat that Emscripten changes weekly; check the companion GitHub repo for errata and updates.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first three-quarters of the book; the final application chapter and Post-MVP roadmap are summarized from the blurb and later excerpts rather than fully detailed.
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
深入浅出WebAssembly (于航)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
深入浅出WebAssembly (于航)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment