wasi.getImportObject()
新增于: v19.8.0
如果除了 WASI 提供的那些之外不需要其他 WASM 导入,则返回一个可以传递给 WebAssembly.instantiate() 的导入对象。
\Return an import object that can be passed to WebAssembly.instantiate() if
no other WASM imports are needed beyond those provided by WASI.
如果将版本 unstable 传递给构造函数,它将返回:
\If version unstable was passed into the constructor it will return:
{ wasi_unstable: wasi.wasiImport } 如果将版本 preview1 传递给构造函数或未指定版本,它将返回:
\If version preview1 was passed into the constructor or no version was
specified it will return:
{ wasi_snapshot_preview1: wasi.wasiImport }