ptwm_core::flavor::wasm
ptwm_core::flavor::wasm
Wasmtime integration. Host calls into a WASM module via a byte- buffer ABI (no Component Model — plain (ptr, len) pairs through linear memory).
ptwm_core::flavor::wasm
crates/ptwm-core/src/flavor/wasm.rs:1mod wasmWasmtime integration. Host calls into a WASM module via a byte- buffer ABI (no Component Model — plain (ptr, len) pairs through linear memory).
ptwm_core::flavor::wasm::invoke_plane_codec_decode
crates/ptwm-core/src/flavor/wasm.rs:220pub fn invoke_plane_codec_decode(instance: &Instance, store: &mut Store<WasmState>, input: &[u8], output: &mut [u8]) -> Result<usize, CodecError>Helper: dispatch into the plane_codec_v1 decode export.
ptwm_core::flavor::wasm::invoke_plane_codec_decode_stateful
crates/ptwm-core/src/flavor/wasm.rs:278pub fn invoke_plane_codec_decode_stateful(instance: &Instance, store: &mut Store<WasmState>, state_version: u8, state_bytes: &[u8], input: &[u8], output: &mut [u8]) -> Result<usize, CodecError>Helper: dispatch into the optional state-aware decode export.
ptwm_core::flavor::wasm::invoke_plane_codec_encode
crates/ptwm-core/src/flavor/wasm.rs:165pub fn invoke_plane_codec_encode(instance: &Instance, store: &mut Store<WasmState>, input: &[u8], output: &mut [u8]) -> Result<usize, CodecError>Helper: dispatch into the plane_codec_v1 encode export.
ptwm_core::flavor::wasm::WasmExtension
crates/ptwm-core/src/flavor/wasm.rs:28pub struct WasmExtensionA loaded WASM extension. Holds the compiled `Module`; each invocation spins up a fresh `Store` from `make_store`.
ptwm_core::flavor::wasm::WasmState
crates/ptwm-core/src/flavor/wasm.rs:38pub struct WasmStatethird_party
Bridge adapter that exposes a third-party DispatchedPlaneCodec (native or WASM, dispatched by canonical id) as if it were an in-tree crate::codec::PlaneCodec. The container decode loop can then treat every plane uniformly through a single Box<dyn PlaneCodec>.
header
v1 PTWM wire-format header.