wasi.initialize(instance)


尝试通过调用其 _initialize() 导出将 instance 初始化为 WASI 反应器(如果存在)。如果 instance 包含 _start() 导出,则会抛出异常。

【Attempt to initialize instance as a WASI reactor by invoking its _initialize() export, if it is present. If instance contains a _start() export, then an exception is thrown.】

initialize() 要求 instance 导出一个名为 memoryWebAssembly.Memory。如果 instance 没有 memory 导出,将抛出异常。

如果多次调用 initialize(),将抛出异常。

【If initialize() is called more than once, an exception is thrown.】