Skip to main content

AirLibrary/Vine/
mod.rs

1//! # Vine Protocol Implementation (Air)
2//!
3//! Air's Vine surface. Implements the gRPC protocol that runs on Air's
4//! side of the bus - Air hosts `AirVinegRPCService` on `[::1]:50053` so
5//! callers (Mountain, external clients, integration tests) can reach
6//! Air's background services (indexing, downloads, updates,
7//! authentication).
8//!
9//! ## Layout
10//!
11//! - [`Generated`] - Air-local prost output for `Air.proto`. Air's own service
12//!   definitions (`UpdateService`, `IndexingService`, `DownloaderService`,
13//!   `AuthenticationService`) live here.
14//! - [`Server`] - Air's gRPC server implementation
15//!   (`Server::AirVinegRPCService`), wiring Air's `ApplicationState` into the
16//!   generated service traits.
17//! - [`Error`] - re-exports the canonical [`VineError`] from the `Vine` crate
18//!   and exposes [`Error::AirCompat`] alias constructors.
19//!
20//! ## Re-exports from the `Vine` crate
21//!
22//! For convenience, the most-used `Vine` crate items are re-exported at
23//! this module's root so Air code can write `use crate::Vine::{VineHost,
24//! IPCProvider};` without spelling out the workspace crate path:
25//!
26//! - [`VineHost`] / [`ApplicationStateAccess`] / [`IPCProvider`] - embedder
27//!   seam (Air's `ApplicationState` implements these to host the `Vine`
28//!   notification handler tree against Air's runtime).
29//! - [`ProtocolVersion`] / [`DefaultRequestTimeoutMs`] /
30//!   [`DefaultMaxMessageSize`] / [`DefaultAirAddress`] - canonical protocol
31//!   constants.
32
33pub mod Error;
34
35pub mod Generated;
36
37pub mod Server;
38
39// Air code that needs the canonical `Vine` items (`VineHost`,
40// `IPCProvider`, `ApplicationStateAccess`, `ProtocolVersion`,
41// `DefaultRequestTimeoutMs`, `DefaultMaxMessageSize`, `DefaultAirAddress`)
42// imports them directly from the `::Vine::` workspace crate at the call
43// site - this module does not re-export them.