Closed syrusakbary closed 1 year ago
Note: we should probably have tests for the standalone WASI commands as well
@syrusakbary, are you still working on this PR?
As mentioned on slack...
If we still want to initialize the WASI object inside the load function instead of allowing people to pass in their own instance, then we'd need to propagate that change through to the other templates and make sure integration tests pass in CI again. In particular...
- Apply the same change to the
bindings.index.js
template (here)- Update the
WasiLoadOptions
type inbindings.index.d.ts
and theRunOptions
type intop-level.index.d.ts
so thewasi
field contains the object passed tonew WASI(...)
(here and here)- Update the snapshot tests and make sure the generated code looks correct (
cargo insta review
)- Update the JavaScript WASI integration test to reflect the new API (here)
That said, I'm not convinced that we need this.
Currently, people can initialize their own WASI
instance and pass it in if they want (e.g. so they can write to stdin and read stdout/stderr while the command is running), otherwise we'll instantiate a default instance for them.
The new WASI()
constructor doesn't require a WebAssembly.Instance
because that's provided when we call wasi.instantiate()
.
🥳 The run time for "Continuous Integration" has improved a lot by 1min 46s (37.99%) 🥳
The current run time is 2mins 53s while master
took 4mins 40s.
Fixed wasi Options