wasefire
wasefire copied to clipboard
API using Component Model or Embedded WASI
Once the https://github.com/WebAssembly/component-model is stable (or stable enough to rely on it), it could improve usability and maintainability to use the associated tooling (like wit-bindgen).
If there is an Embedded WASI, this would definitely improve usability to support it. Applets would be portable across all platforms supporting Embedded WASI. Note that https://github.com/embedded-wasm is already exploring this direction.
Note that as a possible hack, we could also support WASI applets with some conventions (similar to Linux /dev):
- Reading
/api/button/countcould return the number of buttons on the board. - Reading
/api/button/3/statecould return the current state of the button at index 3. - Writing
/api/led/2/statecould set the state of a LED to on or off.
However this "trick" would probably increase the footprint of applets and the platform by embedding all those strings and the logic to produce them.
Finally, maybe WASI won't succeed: https://kerkour.com/webassembly-wasi-preview2.