Value types supported across the guest/host boundary.
Each variant has a fixed lowering to the WASM ABI. Buffer-typed
(String/Bytes) parameters are passed as
an i32 pointer plus i32 length into guest linear memory. Buffer-typed
returns use a caller-provided result buffer: the guest passes a result
pointer and maximum length, and the host writes the payload and returns
the written length as i32 (negative values signal failure). Async
functions instead return an i64 token (see
Function::r#async).
UTF-8 string. Lowered to i32 pointer + i32 length as a parameter;
as a return value, written into the caller’s result buffer with the
written length returned as i32.
Raw byte buffer. Lowered to i32 pointer + i32 length as a
parameter; as a return value, written into the caller’s result buffer
with the written length returned as i32.