The gRPC Protocol Layer for Land 🏞️
Welcome to Vine, the gRPC protocol definition and communication
specification for the Land Code Editor ecosystem. Vine defines the
strongly-typed IPC layer used for communication between Mountain (Rust
backend) and Cocoon (Node.js extension host), as well as the planned Grove
(Rust/WASM extension host).
Vine is engineered to:
- Define Protocol Contracts: Provide
.protofiles that specify the gRPC service definitions for all inter-component communication. - Enable Strong Typing: Ensure type-safe communication through Protocol Buffers and generated Rust/TypeScript code.
- Support Multiple Transports: Design for transport agnosticism with support for TCP, IPC, and WASM host functions.
- Implement Health Monitoring: Provide heartbeat and connection state management for reliable communication.
- Protocol Buffer Definitions:
.protofiles specifying gRPC service definitions for all inter-component communication. - Strong Typing: Type-safe communication through Protocol Buffers with generated Rust and TypeScript code.
- Transport Agnosticism: Designed for multiple transport backends including TCP, IPC, and WASM host functions.
- Health Monitoring: Built-in heartbeat and connection state management for reliable communication.
- Spine Protocol: Extension host coordination using action/response pattern for command execution.
| Principle | Description | Key Components Involved |
|---|---|---|
| Contract-First | Define all service interfaces in .proto files before implementation. |
Proto/*.proto, protocol buffer compiler |
| Type Safety | Generate strongly-typed code from protocol definitions for compile-time guarantees. | Generated Rust/TypeScript code |
| Transport Agnosticism | Design protocol layer independent of specific transport implementation. | Transport trait, strategy pattern |
| Health Awareness | Built-in connection monitoring and heartbeat for reliability. | Health check messages, timeout handling |
| Component | Role & Key Responsibilities |
|---|---|
| gRPC Server | Hosted by Mountain for extension host communication. |
| gRPC Client | Used by Cocoon and Grove to communicate with Mountain. |
| Spine Protocol | Extension host coordination layer for command execution. |
This diagram illustrates Vine's role as the gRPC protocol layer in the Land
ecosystem.
graph LR
classDef vine fill:#f9f,stroke:#333,stroke-width:2px;
classDef mountain fill:#9cf,stroke:#333,stroke-width:2px;
classDef cocoon fill:#ccf,stroke:#333,stroke-width:2px;
classDef grove fill:#cfc,stroke:#333,stroke-width:1px;
subgraph "Mountain ⛰️ (Rust Backend)"
VineServer["Vine gRPC Server"]:::mountain
end
subgraph "Vine 🌿 (Protocol Layer)"
VineProto["Vine.proto"]:::vine
SpineProto["Spine.proto"]:::vine
GroveProto["Grove.proto"]:::vine
end
subgraph "Clients"
CocoonClient["Cocoon gRPC Client"]:::cocoon
GroveClient["Grove gRPC Client"]:::grove
end
VineServer --> VineProto
VineProto <--> CocoonClient
VineProto <--> GroveClient
Element/Vine/
├── Proto/
│ ├── Vine.proto # Core Mountain↔Cocoon communication
│ ├── Spine.proto # Extension host coordination protocol
│ └── Grove.proto # Grove-specific extensions
├── Source/
│ ├── lib.rs # Protocol library
│ ├── Message/ # Message type definitions
│ ├── Service/ # gRPC service implementations
│ └── Client/ # Protocol clients
└── Documentation/
└── Protocol.md # Protocol specification
The current protocol implementation resides in the consuming components:
Mountain: gRPC server implementation inVine/directoryCocoon: gRPC client implementation inServices/MountainGRPCClient.ts
When fully implemented, the protocol structure will include:
Proto/Vine.proto- Core Mountain↔Cocoon communicationProto/Spine.proto- Extension host coordination protocol (action/response pattern for command execution)Proto/Grove.proto- Grove-specific extensions for WASM extension host integrationSource/- Rust implementationSource/Message/- Message type definitionsSource/Service/- gRPC service implementations
For the current protocol specification, refer to the Spine Contract documentation.
Vine is currently a placeholder for the gRPC protocol definitions. The actual
protocol implementation resides in:
Mountain: gRPC server implementation inVine/directoryCocoon: gRPC client implementation inServices/MountainGRPCClient.ts
When fully implemented, Vine will be used as:
[dependencies]
Vine = { git = "https://github.com/CodeEditorLand/Vine.git", branch = "Current" }Key Dependencies (planned):
tonic: Rust gRPC frameworkprost: Protocol Buffers implementation@grpc/grpc-js: Node.js gRPC client (for Cocoon)
| Feature | Status |
|---|---|
| Proto Definitions | ⏳ Planned |
| gRPC Services | ⏳ Planned |
| Spine Protocol | 📝 Specified (see SpineContract.md) |
| Health Monitoring | ⏳ Planned |
| Message Types | ⏳ Planned |
This project is released into the public domain under the Creative Commons CC0
Universal license. You are free to use, modify, distribute, and build upon
this work for any purpose, without any restrictions. For the full legal text,
see the LICENSE file.
Stay updated with our progress! See
CHANGELOG.md for a
history of changes specific to Vine.
Vine is a core element of the Land ecosystem. This project is funded through NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.
The project is operated by PlayForm, based in Sofia, Bulgaria.
PlayForm acts as the open-source steward for Code Editor Land under the NGI0 Commons Fund grant.
| Land | PlayForm | NLnet | NGI0 Commons Fund |
|---|---|---|---|
|
|
|
|
|
Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy