From c72cadbe4670401f96c2a054a27c8e32d263a83d Mon Sep 17 00:00:00 2001 From: Edoardo Vacchi Date: Thu, 22 Aug 2024 18:47:32 +0200 Subject: [PATCH] Fix README Signed-off-by: Edoardo Vacchi --- wasi/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wasi/README.md b/wasi/README.md index 127ccf169..8830cf2b9 100644 --- a/wasi/README.md +++ b/wasi/README.md @@ -167,7 +167,8 @@ var options = WasiOptions.builder().build(); // create our instance of wasip1 var wasi = new WasiPreview1(logger, WasiOptions.builder().build()); // turn those into host imports. Here we could add any other custom imports we have -var imports = new HostImports(wasi.toHostFunctions()); +var wasiInstance = WasiPreview1.instance(WasiPreview1.toHostModule(), wasi); +var imports = new HostImports(wasiInstance.toHostFunctions()); // create the module and connect imports // this will execute the module if it's a WASI command-pattern module Instance.builder(Parser.parse(new File("hello-wasi.wasm"))).withHostImports(imports).build();