Greentic Interfaces Wasmtime Runtime Helpers
greentic-interfaces-wasmtime provides the Wasmtime integration layer for the Greentic platform. It wires host services into a Wasmtime component linker, offers convenience helpers for building engines, and exposes mapper utilities that bridge the ABI structs published by greentic-interfaces with the richer models from greentic-types.
Feature flags
stable-wasmtime(default): builds against Wasmtime releases< 38, compatible with the stable Rust channel.nightly-wasmtime: switches to Wasmtime38.0.3, which currently requires the nightly toolchain due to edition 2024 support and fiber features.
Enable the right flag depending on your toolchain:
[]
= { = "0.1", = false, = ["nightly-wasmtime"] }
Quick start
use ;
let engine = build_engine?;
let mut linker = new.finish;
// Register host services as needed:
// greentic_interfaces_wasmtime::add_secrets_store_to_linker(&mut linker, |state| &mut state.secrets)?;
Host helpers
Use the stable host_helpers::v1::* façade to wire host-import worlds without reaching into generated module paths:
use ;
use Linker;
let mut linker: = new;
add_all_v1_to_linker?;
Implement the Host trait from each v1 module (e.g. v1::http_client::HttpClientHost) on your host state and keep the generated module paths internal.