Skip to main content

Crate Vine

Crate Vine 

Source
Expand description

§Vine 🌿 - gRPC Protocol Layer for Land 🏞️

Vine is the canonical home of the gRPC IPC schema + runtime that wires the Land elements together:

  • Mountain (Tauri editor host) - hosts the MountainService gRPC server; routes notifications from Cocoon and Air into Tauri’s renderer.
  • Cocoon (Node.js extension host) - speaks Vine to invoke VS Code-shaped operations on Mountain.
  • Air (background daemon) - speaks Vine as a client to query Mountain for editor state when running indexing / update / download tasks; also hosts its own AirService gRPC server on [::1]:50053.

§Module layout

  • Error - canonical VineError variants and From conversions for serde_json, tonic::transport, tonic::Status, http::uri::InvalidUri, and std::net::AddrParseError.
  • Host - the VineHost trait, IPCProvider, and ApplicationStateAccess - the seam between Vine handlers and any embedder runtime.
  • Generated - prost-built message types + tonic clients and servers produced from Proto/Vine.proto by build.rs.
  • Client - client building blocks (cargo feature client).
  • Server - server scaffolding + notification handler tree (cargo feature server).
  • Multiplexer - bidirectional envelope multiplexer (OpenChannelFromMountain / OpenChannelFromCocoon per LAND-PATCH B7-S6 P14.1; cargo feature multiplexer).

§Cargo features

FeatureDefaultPulls in
clientSource/Client/ - tonic-generated client stub wrappers + connection pool
serverSource/Server/ - bind helpers + notification handler tree
multiplexerbidirectional streaming envelope multiplexer

§Port allocation

  • 50051 - Mountain Vine server (Cocoon ↔ Mountain)
  • 50052 - Cocoon Vine server (Mountain → Cocoon callbacks)
  • 50053 - Air Vine server (Mountain / external → Air)

Modules§

Client
Vine::Client
DevLog
Vine::DevLog
Error
Vine::Error
Generated
Vine::Generated
Host
Vine::Host
Multiplexer
Bidirectional streaming multiplexer for the Vine gRPC bus.
Server
Vine::Server

Macros§

dev_log
Tag-gated dev log. Compiled out in release builds via cfg!(debug_assertions) short-circuit.

Constants§

DefaultAirAddress
Default Air Vine server bind address.
DefaultCocoonAddress
Default Cocoon Vine server bind address.
DefaultMaxMessageSize
Default maximum gRPC message size, in bytes (4 MB).
DefaultMountainAddress
Default Mountain Vine server bind address.
DefaultRequestTimeoutMs
Default request timeout, in milliseconds, applied to every SendRequestToSideCar invocation that does not pass an explicit override. Per-call overrides are supported - long-running tree-view fetches use ~1 500 ms, indexing queries use the default.
ProtocolVersion
Canonical Vine protocol version. Sent on every gRPC envelope; receivers reject mismatched versions early in the dispatch path.