stateroom-wasm-host

This crate loads a Stateroom WebAssembly module and wraps it in an interface that implements StateroomService, so that it can be used interchangably with native StateroomService implementations. If you only want to serve WebAssembly modules, you can use the stateroom command-line application (which uses this crate) instead of using this crate directly.

WebAssembly interface

The host expects that the WebAssembly module provided to it will conform to a particular interface (that is, has particular named imports and exports). Eventually, WebAssembly extensions like Interface Types may allow us to formalize this interface.

Code generated by stateroom-wasm-macro automatically conforms to the interface, but if you are implementing in a non-Rust language, it's up to you to ensure that imports and exports are available and correctly typed, or else a runtime error will occur when the module is loaded.

Exports

The module is expected to export these functions:

Imports

The module may import any of these functions from the environment: