- Learn WebAssembly
- Mike Rourke
- 189字
- 2021-08-13 15:38:53
WebAssembly.Module
The WebAssembly.Module object is the intermediate step between the ArrayBuffer and the instantiated module. The compile() and instantiate() methods (and their streaming counterparts) return a Promise that resolves with a module (module in lowercase represents the compiled Module). A module can also be created synchronously by passing a typed array or ArrayBuffer directly into the constructor, but this is discouraged for large modules.
The Module object also has three static methods: exports(), imports(), and customSections(). All three take a module as a parameter, but customSections() takes a string representing the section name as its second parameter. Custom sections are described in the Binary Format section of the Core Specification and are intended to be used for debugging information or third-party extensions. In most cases, you won't need to define these. The exports() function is useful if you're using a Wasm module that you didn't create, although you'll only be able to see the name and kind (for example, function) of each export.
For simple use cases, you won't be dealing directly with the Module object or compiled module. Most of the interaction will take place with an Instance.
- UML和模式應用(原書第3版)
- MySQL 8從入門到精通(視頻教學版)
- NLTK基礎教程:用NLTK和Python庫構建機器學習應用
- 深入理解Java7:核心技術與最佳實踐
- 劍指MySQL:架構、調優與運維
- C++面向對象程序設計習題解答與上機指導(第三版)
- Getting Started with Greenplum for Big Data Analytics
- 批調度與網絡問題的組合算法
- Java EE核心技術與應用
- Arduino家居安全系統構建實戰
- D3.js By Example
- Getting Started with Python and Raspberry Pi
- ExtJS Web應用程序開發指南第2版
- 深入實踐Kotlin元編程
- 區塊鏈項目開發指南