Skip to main content

Module value

Module value 

Source
Expand description

Value — a neutral, self-describing value tree for the plugin boundary.

Every fidius execution backend dispatches typed method calls through a single PluginExecutor::call(method, Value) -> Value seam (see fidius-host). Value is the lingua franca each backend maps to its native representation:

  • cdylib: Value → bincode → vtable FFI → bincode → Value
  • python: ValuePyObject → call → PyObjectValue
  • wasm: Valuewasmtime component::Val (Canonical ABI) → Value

The host’s generic call_method<I, O> stays caller-identical by going I → Value (to_value) then Value → O (from_value) around the executor.

Layering rule: Value lives in fidius-core and is deliberately free of any backend dependency. Only the WASM executor (Phase 2) maps it to wasmtime::component::Val; cdylib and Python never see wasmtime.

The variant set mirrors the WebAssembly Component Model value space so the Phase-2 mapping is mechanical: distinct signed/unsigned integer widths, f32/f64, char, string, list<u8> as Value::Bytes, lists, records, options, and variants.

Structs§

ValueError
Error produced while converting to or from Value.

Enums§

Value
A self-describing value crossing the plugin-call boundary.

Functions§

from_value
Convert a Value into any Deserialize type.
to_value
Convert any Serialize type into a Value.