Skip to main content

Crate rill_handler_api

Crate rill_handler_api 

Source
Expand description

Versioned WIT ABI and guest SDK for Rill runtime handlers.

This crate ships the canonical WIT world definition (wit/rill-handler.wit) that every Rill handler must export.

Handler authors compile a Rust crate to wasm32-wasip1 using wit-bindgen to generate guest bindings from the WIT file, then wrap the core module into a Component Model component with wasm-tools component new.

This crate intentionally has no dependencies so that it can be consumed as a build-time WIT source without pulling in any runtime code. The constants below mirror the WIT declarations and are used by both the host and guest for compile-time version checks.

Constantsยง

HANDLER_API_VERSION
Handler ABI version. Independent from the host IPC API version and the model pack format version. Increment only on a breaking WIT change.
MAX_CAPABILITIES
Maximum number of capabilities a handler may declare.
MAX_CAPABILITY_LEN
Maximum length of a capability string.
MAX_HANDLER_ID_LEN
Maximum length of a handler id.
MAX_HANDLER_VERSION_LEN
Maximum length of a handler version string.
WIT_PACKAGE
WIT package name as declared in rill-handler.wit.
WIT_VERSION
WIT package version as declared in rill-handler.wit.
WIT_WORLD
WIT world name as declared in rill-handler.wit.