Expand description
WebAssembly component engine for executing workloads.
This module provides the core engine functionality for compiling and executing
WebAssembly components. The Engine is responsible for:
- Compiling WebAssembly components using wasmtime
- Initializing workloads with their components and dependencies
- Managing volume mounts and resource configurations
- Setting up WASI and HTTP interfaces for components
§Key Types
Engine- The main engine for WebAssembly executionEngineBuilder- Builder for configuring engine settingsWorkloadComponent- Individual components within a workload
§Example
use wash_runtime::engine::Engine;
use wash_runtime::types::Workload;
let engine = Engine::builder().build()?;
let workload = Workload {
namespace: "default".to_string(),
name: "my-workload".to_string(),
// ... other fields
};
let unresolved = engine.initialize_workload("workload-1", workload)?;
// ... bind to plugins and resolveModules§
- ctx
- Component execution context for wasmtime stores.
- workload
- This module is primarily concerned with converting an
UnresolvedWorkloadinto aResolvedWorkloadby resolving all components and their dependencies.
Structs§
- Engine
- The core WebAssembly engine for executing components and workloads.
- Engine
Builder - Builder for constructing an
Enginewith custom configuration.