Wasm 实例阶段导入
¥Wasm Instance Phase Imports
稳定性: 1.1 - 积极开发
¥Stability: 1.1 - Active development
实例导入允许将任何 .wasm
文件作为普通模块导入,并支持其模块导入。
¥Instance imports allow any .wasm
files to be imported as normal modules,
supporting their module imports in turn.
例如,index.js
包含:
¥For example, an index.js
containing:
import * as M from './library.wasm';
console.log(M);
在以下条件下执行:
¥executed under:
node index.mjs
将为 library.wasm
的实例化提供导出接口。
¥would provide the exports interface for the instantiation of library.wasm
.