pub trait Runtimewhere
    Self: Debug,{
    // Required methods
    fn networking(&self) -> &DynVirtualNetworking;
    fn task_manager(&self) -> &Arc<dyn VirtualTaskManager>;
    fn package_loader(&self) -> Arc<dyn PackageLoader + Send + Sync>;
    fn module_cache(&self) -> Arc<dyn ModuleCache + Send + Sync>;
    fn source(&self) -> Arc<dyn Source + Send + Sync>;

    // Provided methods
    fn engine(&self) -> Option<Engine> { ... }
    fn new_store(&self) -> Store { ... }
    fn http_client(&self) -> Option<&DynHttpClient> { ... }
    fn tty(&self) -> Option<&(dyn TtyBridge + Send + Sync)> { ... }
}
Expand description

Runtime components used when running WebAssembly programs.

Think of this as the “System” in “WebAssembly Systems Interface”.

Required Methods§

source

fn networking(&self) -> &DynVirtualNetworking

Provides access to all the networking related functions such as sockets.

source

fn task_manager(&self) -> &Arc<dyn VirtualTaskManager>

Retrieve the active VirtualTaskManager.

source

fn package_loader(&self) -> Arc<dyn PackageLoader + Send + Sync>

A package loader.

source

fn module_cache(&self) -> Arc<dyn ModuleCache + Send + Sync>

A cache for compiled modules.

source

fn source(&self) -> Arc<dyn Source + Send + Sync>

The package registry.

Provided Methods§

source

fn engine(&self) -> Option<Engine>

Get a wasmer::Engine for module compilation.

source

fn new_store(&self) -> Store

Create a new wasmer::Store.

source

fn http_client(&self) -> Option<&DynHttpClient>

Get a custom HTTP client

source

fn tty(&self) -> Option<&(dyn TtyBridge + Send + Sync)>

Get access to the TTY used by the environment.

Implementors§