更新时间:2021-08-13 15:39:50
封面
Title Page
Copyright and Credits
Learn WebAssembly
Dedication
PacktPub.com
Why subscribe?
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
What is WebAssembly?
The road to WebAssembly
The evolution of JavaScript
Google and Native Client
Mozilla and asm.js
WebAssembly is born
What exactly is WebAssembly and where can I use it?
Official definition
Binary instruction format
Portable target for compilation
The core specification
Language concepts
Semantic phases
The JavaScript and Web APIs
So will it replace JavaScript?
Where can I use it?
What languages are supported?
C and C++
Rust
Other languages
What are the limitations?
No garbage collection
No direct DOM access
No support in older browsers
How does it relate to Emscripten?
Emscripten's role
The EMSDK and Binaryen
Summary
Questions
Further reading
Elements of WebAssembly - Wat Wasm and the JavaScript API
Common structure and abstract syntax
Wat
Definitions and S-expressions
Values types and instructions
Role in the development process
Binary format and the module file (Wasm)
Definition and module overview
Module sections
WebAssembly store and object caches
Loading a module and the WebAssembly namespace methods
WebAssembly objects
WebAssembly.Module
WebAssembly.Instance
WebAssembly.Memory
WebAssembly.Table
WebAssembly errors (CompileError LinkError RuntimeError)
Connecting the dots with WasmFiddle
What is WasmFiddle?
C code to Wat
Wasm to JavaScript
Setting Up a Development Environment
Installing the development tooling
Operating systems and hardware
macOS
Ubuntu
Windows
Package managers
Homebrew for macOS
Apt for Ubuntu
Chocolatey for Windows
Git
Installing Git on macOS
Installing Git on Ubuntu
Installing Git on Windows
Node.js
nvm
Installing nvm on macOS
Install nvm on Ubuntu
Installing nvm on Windows
Installing Node.js using nvm
GNU make and rimraf
GNU Make on macOS and Ubuntu
Installing GNU Make on macOS
Installing GNU Make on Ubuntu