- Learn WebAssembly
- Mike Rourke
- 288字
- 2021-08-13 15:38:52
Definition and module overview
The binary format is defined as a dense linear encoding of the abstract syntax. Without getting too technical, that essentially means it's an efficient form of binary that allows for fast decoding, small file size, and reduced memory usage. The file representation of the binary format is a .wasm file, which will be the compilation output from Emscripten that we'll use for our examples.
The Values, Types, and Instructions subsections of the Core Specification for the binary format correlate directly to the Text Format section. Each of these concepts is covered in the context of encoding. For example, according to the specification, the Integer types are encoded using the LEB128 variable-length integer encoding, in either unsigned or signed variant. These are important details to know if you wish to develop tooling for WebAssembly, but not necessary if you just plan on using it on your website.
The Structure, Binary Format, and Text Format (wat) sections of the Core Specification have a Module subsection. We didn't cover aspects of the module in the previous section because it's more prudent to describe them in the context of a binary. The official WebAssembly site offers the following description for a module:
We will discuss how to interact with the module using the JavaScript and Web APIs later in this chapter, so let's establish some context to understand how the module elements map to the API methods.
- 極簡算法史:從數(shù)學到機器的故事
- Learning Selenium Testing Tools with Python
- Podman實戰(zhàn)
- Building Cross-Platform Desktop Applications with Electron
- Web全棧工程師的自我修養(yǎng)
- Oracle Database 12c Security Cookbook
- FFmpeg入門詳解:音視頻原理及應(yīng)用
- Learning DHTMLX Suite UI
- JavaScript機器人編程指南
- 軟件體系結(jié)構(gòu)
- 零基礎(chǔ)學Scratch 3.0編程
- Mastering Android Studio 3
- Building Apple Watch Projects
- Go語言編程之旅:一起用Go做項目
- 嵌入式Linux與物聯(lián)網(wǎng)軟件開發(fā):C語言內(nèi)核深度解析