feat(runtime): add resident Wasmtime actor runtime
- define versioned service and clock WIT contracts - enforce import allowlists, fuel, epoch, memory, I/O, and mailbox limits - keep one Store and Component Instance resident per serial Actor - add echo, counter, fault, spin, and capability probe components - cover lifecycle, concurrency, sandbox, and fault recovery behavior
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
mod bindings {
|
||||
wit_bindgen::generate!({
|
||||
path: "wit",
|
||||
world: "wasi-clock-probe-component",
|
||||
});
|
||||
}
|
||||
|
||||
struct WasiClockProbe;
|
||||
|
||||
impl bindings::Guest for WasiClockProbe {
|
||||
fn init(_config: Vec<u8>) -> Result<(), bindings::ServiceError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn invoke(input: Vec<u8>) -> Result<Vec<u8>, bindings::ServiceError> {
|
||||
let _ = std::time::Instant::now();
|
||||
Ok(input)
|
||||
}
|
||||
}
|
||||
|
||||
bindings::export!(WasiClockProbe with_types_in bindings);
|
||||
Reference in New Issue
Block a user