pub trait ProcessState: Sized {
    type Config: ProcessConfig + Default + Send + Sync;

Show 14 methods fn new_state(
        &self,
        module: Arc<WasmtimeCompiledModule<Self>>,
        config: Arc<Self::Config>
    ) -> Result<Self>; fn state_for_instantiation() -> Self; fn register(linker: &mut Linker<Self>) -> Result<()>; fn initialize(&mut self); fn is_initialized(&self) -> bool; fn runtime(&self) -> &WasmtimeRuntime; fn module(&self) -> &Arc<WasmtimeCompiledModule<Self>>; fn config(&self) -> &Arc<Self::Config>; fn id(&self) -> u64; fn signal_mailbox(&self) -> &(SignalSender, SignalReceiver); fn message_mailbox(&self) -> &MessageMailbox ; fn config_resources(&self) -> &ConfigResources<Self::Config>; fn config_resources_mut(&mut self) -> &mut ConfigResources<Self::Config>; fn registry(&self) -> &Arc<DashMap<String, (u64, u64)>>;
}
Expand description

The internal state of a process.

The ProcessState has two main roles:

  • It holds onto all vm resources (file descriptors, tcp streams, channels, …)
  • Registers all host functions working on those resources to the Linker

Required Associated Types

Required Methods

Register all host functions to the linker.

Marks a wasm instance as initialized

Returns true if the instance was initialized

Returns the WebAssembly runtime

Returns the process configuration

Implementors