Module WASM

Module WASM 

Source
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

Re-exports§

pub use Runtime::WASMConfig;
pub use Runtime::WASMRuntime;

Modules§

FunctionExport
Function Export Module
HostBridge
Host Bridge
MemoryManager
WASM Memory Manager
ModuleLoader
WASM Module Loader
Runtime
WASM Runtime Module

Structs§

WASMStats
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