|
cwist
Modern C web framework with libttak runtime
|
WASI component-model helpers for CWIST guest apps (issue #203). More...
Go to the source code of this file.
WASI component-model helpers for CWIST guest apps (issue #203).
Counterpart of wasm_entry.h for the component pipeline: the same cwist_app_dispatch_memory() core, reached through the canonical ABI exports of wit/cwist.wit (world cwist-guest) instead of Emscripten's pointer ABI.
The guest app implements the two exports wit-bindgen generates from the world (dispatch, use-session) and forwards them to the helpers below; see tests/wasm_component_guest.c for the full pattern. Guest-side buffer ownership is implicit in the canonical ABI: the host copies the returned list<u8> out of guest linear memory, so there is no dispose entry point.
WASI-only: everything is guarded by wasi and this header is a no-op elsewhere, like typedarray.h on native toolchains.
Definition in file wasm_component.h.