Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <[email protected]>
  • Loading branch information
evacchi committed Aug 22, 2024
1 parent 59c093d commit c72cadb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wasi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c72cadb

Please sign in to comment.