Expand description
WebAssembly Runtime Module
This module provides WebAssembly runtime support using WASMtime, enabling Grove to execute VS Code extensions compiled to WebAssembly.
§Architecture
+++++++++++++++++++++++++++++++++++++++
+ WASM Runtime +
+++++++++++++++++++++++++++++++++++++++
+ wasmty::Engine +
+ wasmty::Store +
+ wasmty::Module +
+ wasmty::Instance +
+++++++++++++++++++++++++++++++++++++++
+ +
▼ ▼
++++++++++++++++++++ ++++++++++++++++++++
+ HostBridge + + MemoryManager +
+ (Communication) + + (Memory mgmt) +
++++++++++++++++++++ ++++++++++++++++++++
+
▼
++++++++++++++++++++
+ FunctionExport +
+ (Host exports) +
++++++++++++++++++++§Key Components
Runtime- WASMtime engine and store managementModuleLoader- WASM module compilation and instantiationMemoryManager- WASM memory allocation and managementHostBridge- Host-WASM function communication bridgeFunctionExport- Export host functions to WASM
Re-exports§
pub use Runtime::WASMConfig;pub use Runtime::WASMRuntime;
Modules§
- Function
Export - Function Export Module
- Host
Bridge - Host Bridge
- Memory
Manager - WASM Memory Manager
- Module
Loader - WASM Module Loader
- Runtime
- WASM Runtime Module
Structs§
- WASM
Stats - WASM runtime statistics
Constants§
- DEFAULT_
MAX_ EXECUTION_ TIME_ MS - Default maximum execution time in milliseconds
- DEFAULT_
MEMORY_ LIMIT_ MB - Default configuration for WASM runtime Default memory limit in megabytes
- DEFAULT_
TABLE_ SIZE - Default table size
Functions§
- init_
wasm_ runtime - Initialize WASM runtime with default configuration