wasefire icon indicating copy to clipboard operation
wasefire copied to clipboard

API using Component Model or Embedded WASI

Open ia0 opened this issue 2 years ago • 0 comments
trafficstars

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/count could return the number of buttons on the board.
  • Reading /api/button/3/state could return the current state of the button at index 3.
  • Writing /api/led/2/state could 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.

ia0 avatar Mar 24 '23 09:03 ia0