Skip to main content

Module schema

Module schema 

Source
Expand description

Wire versioning contract shared between host and plugin authors.

The host and each plugin agree on a WireVersion per hook. Plugin authors declare their hook’s version in #[hook(...)] metadata, and the host verifies at admission time that the declared version is in the host’s supported list AND that the wasm’s embedded layout fingerprint matches the host’s computed fingerprint.

Enums§

HookKind
Plugin hook kind. Each hook is a distinct wire contract.
WireVersion
Wire schema version. Distinct enum values indicate incompatible struct layouts. Bump when adding/removing/reordering fields of ANY hook’s wire type. Once V2 is added, V1 stays as a supported legacy version until deprecated by explicit host-list removal.

Constants§

HOST_SUPPORTED_FILTER_VERSIONS
Host-supported versions per hook. Update when adding new versions.
HOST_SUPPORTED_OBSERVE_VERSIONS
HOST_SUPPORTED_SHAPE_VERSIONS

Traits§

WireSchema
Layout fingerprint published by each wire struct via the #[derive(WireSchema)] proc-macro (defined in cc-lb-pdk-wasmtime-macros). The macro walks the struct AST, serialises fields to a canonical descriptor string, then embeds BLAKE3(descriptor) as a 32-byte const.

Functions§

host_supported_versions
host_supports
pack_ret
Packed (out_ptr, out_len) return value used by every guest hook export.
unpack_ret
Inverse of pack_ret.