withWasiPreview2
Installs a Preview 2 host with an explicit lifecycle.
WasiPreview2HostOwnership.OWNED transfers responsibility immediately: this builder closes the host if configuration or build fails, and a successfully built plugin closes it from WasmPlugin.close. A WasiPreview2HostOwnership.BORROWED host is never closed by the builder or plugin.
Deprecated
Preview 2 host ownership must be explicit. Use withWasiPreview2(wasi, WasiPreview2HostOwnership.BORROWED).
Replace with
withWasiPreview2(wasi, WasiPreview2HostOwnership.BORROWED)Content copied to clipboard