Expand description
Per-instance state used by TensorWasmExecutor.
Each running Wasm instance has a TensorWasmInstance which owns:
- the wasmtime
Store<InstanceState>driving execution, - the wasmtime
Instanceitself, - identity (
TenantId,InstanceId), - per-instance deadlines and metadata used by metrics and tracing,
- the per-instance
TensorWasmResourceLimiterthat caps linear-memory growth.
Instances are typically held inside an Arc<Mutex<TensorWasmInstance>> so the
executor can drive their lifecycle from a Tokio task while the API layer
invokes exported functions.
Structsยง
- Instance
State - Side-channel data attached to each wasmtime
Store. - Tensor
Wasm Instance - A running Wasm instance.