Skip to main content

Module Host

Module Host 

Source
Expand description

§Vine::Host

VineHost is the embedder-facing seam between Vine and its consumer runtime. Mountain (Tauri runtime), Air (background daemon), and any Rust-side Cocoon client implement this trait to expose the minimum surface Vine’s notification handlers need: application-state access, renderer event emission, and an IPCProvider handle for cross-channel re-entrancy. Handlers operate on &dyn VineHost so a single handler tree can be hosted against any embedder runtime.

§Design notes

  • ApplicationState returns &dyn ApplicationStateAccess. Vine treats application state as opaque; embedders decide what their state exposes via embedder-local sub-traits and downcasting.
  • EmitToRenderer is the single entry point for “send a value to the workbench / Sky window.” Mountain wires it to tauri::WebviewWindow::emit; Air leaves it as a no-op (no renderer).
  • IPCProvider returns Arc<dyn IPCProvider> for handlers that need to re-enter the IPC bus.

§Stability

Adding methods to VineHost is a compatible change so long as every impl is updated in the same revision. Removing a method requires sweeping every consumer.

Traits§

ApplicationStateAccess
Opaque application-state handle exposed to Vine handlers.
IPCProvider
Cross-channel IPC provider abstraction.
RendererEmitter
Cheap-to-clone renderer event sink.
VineHost
The embedder-facing seam between Vine and its host runtime.