WebAssembly / wasi-cli

Command-Line Interface (CLI) World for WASI
Other
68 stars 11 forks source link

Add a `reactor` world #23

Closed alexcrichton closed 1 year ago

alexcrichton commented 1 year ago

Similar to how there exists a command world this commit adds a reactor world which has everything that a command does except for the export of the run interface. This mirrors the preview1-adapter-reactor that Wasmtime currently has and is intended to make this available for other WIT-based projects as well.

This commit additionally refactors the preexisting command world to replace all of its imports with a single include of this new reactor world.

alexcrichton commented 1 year ago

I believe that the CI failure will get fixed by https://github.com/WebAssembly/wasi-tools/pull/18

alexcrichton commented 1 year ago

Ok I've fixed the CI here by updating to a version of the github action that uses wit-bindgen proposed in https://github.com/WebAssembly/wit-abi-up-to-date/pull/16. That required regenerating the documentation here as well. This is an example though of using wit-bindgen-the-CLI for this instead of the wasi-tools repository.

This shouldn't merge until https://github.com/WebAssembly/wit-abi-up-to-date/pull/16 is merged however as otherwise it's pointing at a temporary fork of mine.

alexcrichton commented 1 year ago

Ok now I've updated this to the "official" version of the github action so this should be ready to go.

sunfishcode commented 1 year ago

Looks good!