Expand description
Grove - Rust/WASM Extension Host for VS Code
Grove provides a secure, sandboxed environment for running VS Code extensions compiled to WebAssembly or native Rust. It complements Cocoon (Node.js) by offering a native extension host with full WASM support.
§Architecture
+++++++++++++++++++++++++++++++++++++++++++
+ Extension Host +
+++++++++++++++++++++++++++++++++++++++++++
+ Extension Manager → Activation Engine +
+ API Bridge → VS Code API +
+++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++▼++++++++++++++++++++++
+ WASM Runtime (WASMtime) +
+ Module Loader → Host Bridge +
+++++++++++++++++++++++++++++++++++++++++++
+
++++++++++++++++++++▼++++++++++++++++++++++
+ Transport Layer +
+ gRPC | IPC | Direct WASM +
+++++++++++++++++++++++++++++++++++++++++++§Features
- Standalone Operation: Run independently or connect to Mountain via gRPC
- WASM Support: Full WebAssembly runtime with WASMtime
- Multiple Transport: gRPC, IPC, and direct WASM communication
- Secure Sandboxing: WASMtime-based isolation for untrusted extensions
- Cocoon Compatible: Shares API surface with Node.js host
§Example: Standalone Usage
use grove::{ExtensionHost, Transport};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let host = ExtensionHost::new(Transport::default()).await?;
host.load_extension("/path/to/extension").await?;
host.activate().await?;
Ok(())
}§Module Organization
Host- Extension hosting core (ExtensionHost, ExtensionManager, etc.)WASM- WebAssembly runtime integrationTransport- Communication strategies (gRPC, IPC, WASM)API- VS Code API facade and typesProtocol- Protocol handling (Spine connection)Services- Host services (configuration, etc.)Common- Shared utilities and error types
Re-exports§
pub use API::types;pub use API::vscode;pub use Binary::Build::RuntimeBuild;pub use Binary::Build::ServiceRegister;pub use Binary::Main::Entry::Entry;pub use Binary::Main::Entry::ValidationResult;pub use Binary::Main::Entry::BuildResult;pub use Binary::Main::Entry::ExtensionInfo;pub use Common::error::GroveError;pub use Common::error::GroveResult;pub use Common::traits::ExtensionContext;pub use WASM::Runtime;
Modules§
- API
- API Module
- Binary
- Binary Module
- Common
- Common Module
- Host
- Host Module
- Protocol
- Protocol Module
- Services
- Services Module
- Transport
- Transport Layer Module
- WASM
- WebAssembly Runtime Module
Structs§
- Grove
Info - Grove library information
Constants§
- VERSION 🔒
Functions§
- init
- Initialize Grove library