Given the following .wit file:
resource aggregate {
static new: function(id: string) -> aggregate
apply-events: function(events: list<list<u8>>) -> expected<unit, error>
handle-command: function(command: list<u8>) -> expected<list<list<u8>>, error>
}
How could I inspect the state of the resource from wasmtime?
For example:
export!("domain.wit");
pub struct Aggregate {
foo: i32
}
impl domain::Aggregate for Aggregate { ... }
How could I inspect foo
after it's been compiled to wasm and running in wasmtime?
Resources are intended to be opaque handles so if wasm is providing a resource to the host then the host has no way to inspect the contents of the resource since that's an implementation detail of the wasm blob that the host doesn't know about.
Ari Seyhun has marked this topic as resolved.
Last updated: Dec 23 2024 at 12:05 UTC