|
|
|
The Native Background Daemon for LandβποΈ
VS Codecold-starts slowly because everything initializes fresh each launch. Updates require a full restart that kills open terminals and in-progress work. There is no mechanism to pre-stage work between sessions.
"The next version is already downloaded and verified before you decide to update. The main window never blocks waiting for a download."
Both badges moved off the /badge/ path, whose single-string slugs
(License-CC0_1.0-lightgrey.svg and Rust-1.95.0+-orange.svg) break as soon
as a label or message contains a slash. The superseded markup is kept here for
provenance:
README.md (superseded badge markup)
[](https://github.com/CodeEditorLand/Air/tree/Current/LICENSE)
[](https://www.rust-lang.org/)Note
Same two badges, same meaning - only the endpoint changed, with + encoded
as %2F-style percent escaping (%2B) so the message survives the URL.
Rust API Documentationβπ
Air is the lightweight, persistent daemon that powers the background capabilities of the Land Code Editor. While Mountainββ°οΈ handles the core application logic and UI, Air operates as a specialized sidecar process dedicated to heavy lifting, network operations, and system maintenance. It ensures that the main editor remains responsive by offloading resource-intensive tasks such as updates, large downloads, cryptographic signing, and file indexing.
VS Code cold-starts slowly because everything initializes fresh each launch,
and updates require a full restart. Air solves this by running as a
persistent background process that survives window closures, pre-stages updates,
and keeps a warm file index across sessions - so the editor is always ready the
moment you launch it.
Air is engineered to:
- Serve as the Persistent Background Daemon - Run as a standalone process
alongside Mountainββ°οΈ, surviving window closures and maintaining
background services across sessions via
Daemon/singleton enforcement and platform-native daemonization. - Own the Update Lifecycle - Take full ownership of downloading, verifying,
and applying patches for Land without user interruption or restart
prompts, with staged installation and automatic rollback via
Updates/. - Offload Heavy Network Operations - Act as the traffic manager for large
downloads (extensions, language servers, dependencies) with resilient,
resume-capable transfers through
Downloader/andResilience/. - Isolate Security-Critical Operations - Manage cryptographic signing,
secure credential storage, and authentication token lifecycle via
Security/andAuthentication/, keeping sensitive logic isolated from the main application process.
gRPC Native Communication - All inter-process communication with
Mountainββ°οΈ travels over a
VineβπΏ (tonic-based gRPC) channel on [::1]:50053,
providing strongly-typed protobuf contracts, bi-directional streaming for
progress events, and a well-defined API surface generated from
Proto/Air.proto.
Self-Contained Daemon Lifecycle - Runs as an independent process with
singleton enforcement via PID locking in Daemon/, graceful shutdown on
SIGTERM managed by Binary/Shutdown/WaitForShutdownSignal.rs, and
platform-native daemonization on macOS, Linux, and Windows. Survives
window closures and persists across editor sessions.
Resilient Update Engine - Full ownership of the update lifecycle: version
checking against multiple channels (stable, beta, nightly) in Updates/,
concurrent chunked downloads with resume capability in Downloader/,
cryptographic checksum verification via Security/ChecksumVerifier.rs, staged
installation, and automatic rollback on failure via Updates/RollbackState.rs.
Isolated Security Boundaries - Cryptographic signing with ring, AEAD
encrypted credential storage with zeroize in Security/SecureStorage.rs,
token lifecycle management in Authentication/, rate limiting via token bucket
in Security/TokenBucket.rs, and a comprehensive security audit subsystem in
Security/SecurityAuditor.rs - all isolated from the main application process.
Real-Time File Indexing - Persistent file index with Rust and TypeScript
symbol extraction in Indexing/Language/, recursive directory scanning via
Indexing/Scan/, notify-based file system watching for live updates in
Indexing/Watch/, and a fast query engine with fuzzy search across the entire
workspace in Indexing/Store/.
Observability by Default - Structured JSON logging with trace-ID
propagation in Logging/, OpenTelemetry-compatible distributed tracing with
configurable sampling in Tracing/, and Prometheus-compatible metrics for
latency, success rates, and resource utilization across every service in
Metrics/.
Resilience Everywhere - All network operations are wrapped in retry-with-
exponential-backoff via Resilience/Retry.rs, circuit breakers with half-open
probing in Resilience/CircuitBreaker.rs, bulkhead executors for service
isolation in Resilience/BulkheadExecutor.rs, and configurable timeouts via
Resilience/Timeout.rs.
| Principle | Description | Key Components |
|---|---|---|
| Sidecar Isolation | Run as a standalone daemon process, surviving independently of the main window lifecycle for persistent background operations. | Daemon/, Binary/, PID locking |
gRPC IPC Boundary |
Use VineβπΏ (tonic-based gRPC) for all communication with Mountainββ°οΈ, ensuring a high-performance and well-defined API. |
Vine/, Proto/Air.proto, generated prost bindings |
| Service Modularity | Each capability (updates, downloads, auth, indexing) lives in its own module with independent startup and health monitoring. | Updates/, Downloader/, Authentication/, Indexing/ |
| Resilience by Default | Wrap all network operations in retry-with-backoff, circuit breakers, bulkheads, and timeouts via the shared Resilience/ library. |
Resilience/, HealthCheck/ |
| Secure Credential Handling | Never expose raw secrets; store credentials with AEAD encryption (ring), enforce key rotation, and audit all access. |
Security/, Authentication/, zeroize |
graph LR
classDef mountain fill:#f0d0ff,stroke:#9b59b6,stroke-width:2px,color:#2c0050;
classDef air fill:#e0f4ff,stroke:#2471a3,stroke-width:2px,color:#001040;
classDef external fill:#ebebeb,stroke:#888,stroke-width:1px,stroke-dasharray:5 5,color:#333;
classDef infra fill:#fff3c0,stroke:#f39c12,stroke-width:1px,stroke-dasharray:5 5,color:#5a3e00;
subgraph MOUNTAIN["Mountainββ°οΈ - Main Application"]
MountainIPC["Mountain gRPC client delegates heavy tasks"]:::mountain
end
subgraph AIR["Airβπͺβ- Persistent Background Daemon (::1:50053)"]
direction TB
subgraph COMM["Vine/ - gRPC Transport"]
VineServer["Vine/Server/ - gRPC server (Generated/ prost bindings)"]:::air
MountainClient["Mountain gRPC client (Air β Mountain callbacks)"]:::air
end
subgraph CORE["Core Services"]
Updates["Updates/ - version check, download, verify, staged install, rollback"]:::air
Downloader["Downloader/ - parallel chunks, rate-limit, resume, retry"]:::air
Auth["Authentication/ - token mgmt, AEAD encrypt, key rotation"]:::air
Indexing["Indexing/ - file index, symbol extract, FS watch, search"]:::air
end
subgraph INFRA["Infrastructure"]
Health["HealthCheck/ - Alive/Responsive/Functional, auto-recovery"]:::infra
Resilience["Resilience/ - retry backoff, circuit breaker, bulkhead"]:::infra
Metrics["Metrics/ - Prometheus-compatible, latency, success rate"]:::infra
Security["Security/ - AES-GCM, checksum, audit"]:::infra
Daemon["Daemon/ - PID lock, singleton enforce"]:::air
end
VineServer --> Updates
VineServer --> Downloader
VineServer --> Auth
VineServer --> Indexing
Updates --> Resilience
Downloader --> Resilience
end
subgraph EXTERNAL["ExternalββοΈ"]
UpdateSrv["Update servers / extension registry"]:::external
end
MountainIPC -- gRPC :50053 --> VineServer
MountainClient -- progress events --> MountainIPC
Updates -- fetches --> UpdateSrv
Downloader -- downloads --> UpdateSrv
Connection paths:
| Path | Protocol | Use Case |
|---|---|---|
Mountainββ°οΈ β Airβπͺ via gRPC |
protobuf over gRPC on port 50053 |
Delegate updates, downloads, indexing, auth |
Airβπͺ β Mountainββ°οΈ via gRPC callback |
protobuf over gRPC |
Progress events, health status, metrics |
Airβπͺ β External via HTTP |
HTTPS with Mistβπ«οΈ DNS isolation |
Update servers, extension registries |
| Component | Path | Description |
|---|---|---|
| Binary Entry Point | Source/Binary.rs |
Binary entry point for the Air daemon |
| Library Root | Source/Library.rs |
Module declarations and crate-level exports |
| Daemon Lifecycle | Source/Binary/ |
Daemon process lifecycle (startup, shutdown, monitoring) |
| Singleton Enforcer | Source/Daemon/ |
Singleton enforcement, PID locking, platform-native integration |
| Initialization | Source/Initialize/ |
Configuration, port binding, gRPC server construction, per-service startup |
| CLI Interface | Source/CLI/ |
Command-line interface for daemon interaction and diagnostics |
gRPC Client |
Source/Client/ |
Typed gRPC client (AirClient) and service provider (AirServiceProvider) for Mountainββ°οΈ interaction |
gRPC Protocol |
Source/Vine/ |
gRPC protocol implementation (generated prost bindings, server, errors) |
| Application State | Source/ApplicationState/ |
Central coordination (connections, service states, telemetry, resources) |
| Configuration | Source/Configuration/ |
TOML config loading with schema validation, env overrides, hot reload |
| Updates | Source/Updates/ |
Version checking, download, verification, staged install, rollback |
| Downloader | Source/Downloader/ |
Parallel downloads, chunk transfers, rate limiting, resume capability |
| Authentication | Source/Authentication/ |
Token management, credential storage, AEAD encryption, key rotation |
| Indexing Engine | Source/Indexing/ |
File index, symbol extraction, scanning, persistent storage, FS watch |
| Health Check | Source/HealthCheck/ |
Multi-level health monitoring (alive, responsive, functional) with auto-recovery |
| Logging | Source/Logging/ |
Structured JSON logging with trace-ID propagation, rotation, sensitive data filtering |
| Metrics | Source/Metrics/ |
Prometheus-compatible metrics (latency, success rate, resource usage) |
| Resilience | Source/Resilience/ |
Retry with exponential backoff, circuit breaker, bulkhead, timeout management |
| Security | Source/Security/ |
Checksum verification, AES-GCM credential storage, rate limiting, audit subsystem |
| Tracing | Source/Tracing/ |
Distributed tracing with sampling, span events, context propagation |
| HTTP Client | Source/HTTP/ |
Secure HTTP client with custom DNS via Mistβπ«οΈ, TLS, timeout management |
| Mountain Bridge | Source/Mountain/ |
Client for Mountainββ°οΈ callbacks with TLS configuration |
| Plugin System | Source/Plugins/ |
Plugin discovery, loading, sandboxing, event bus, and capability management |
Source/Initialize/Configure/
is the pre-service step: it prepares the two things every later subsystem
assumes are already settled - where logs go, and which address the gRPC
server binds. It holds exactly two submodules, Log/ and Port/.
| Unit | Entry point | Responsibility |
|---|---|---|
Initialize/Configure/Log/ |
ConfigureLog() |
Installs the tracing subscriber before any service emits a span |
Initialize/Configure/Port/ |
SelectPort(), ValidatePort() |
Parses and validates the bind address, rejecting the port Cocoon owns |
Source/Initialize/Configure/Port/SelectPort.rs
pub fn SelectPort(bind_address:Option<String>) -> Result<SocketAddr, String> {
pub fn ValidatePort(port:u16) -> Result<(), String> {Note
SelectPort defaults to [::1]:50053 and guards against the 50052/50053
conflict, so a misconfigured daemon fails at startup rather than mid-session.
Source/DevLog.rs
is a tag-filtered development logger driven by the Trace environment
variable. It is silent by default - an unset Trace produces no output at all,
which is what keeps a background daemon quiet. The same tag vocabulary works
across Mountainββ°οΈ, Airβπͺ, and the
TypeScript side, and Trace=short additionally aliases long app-data paths
to $APP and collapses consecutive duplicates with an (x14) suffix.
Representative tags include lifecycle, grpc, indexing, http, daemon,
security, metrics, resilience, update, vfs, ipc, config,
storage, extensions, and air.
Terminal
Trace=lifecycle,grpc ./Air # only lifecycle + gRPC
Trace=short ./Air # everything, compressed + dedupedNote
DevLog also exposes EmitOTLPSpan plus the dev_log! and otel_span!
macros, which is how tracing output reaches an OpenTelemetry collector.
Source/Vine/Generated/
is not hand-written. build.rs runs tonic-prost-build over
Proto/Air.proto and emits air.rs into this directory, producing both the
client and server halves of AirService - the 16 RPCs covering
authentication, updates, downloads, indexing, status, resources, and
configuration.
build.rs
tonic_prost_build::configure()
.build_server(true)
.build_client(true)
.out_dir("Source/Vine/Generated")Warning
Edits to Source/Vine/Generated/air.rs are overwritten on the next build -
change Proto/Air.proto instead.
Element/Air/
βββ Cargo.toml # Package manifest with feature flags
βββ build.rs # Build script (tonic/prost codegen)
βββ LICENSE # CC0-1.0 license
βββ Source/
β βββ Binary.rs # Binary entry point
β βββ Library.rs # Library root (rlib)
β βββ DevLog.rs # Development logging utilities
β βββ ApplicationState/
β β βββ mod.rs
β β βββ ApplicationState.rs # Central application state
β β βββ ConnectionHealthReport.rs
β β βββ ConnectionInfo.rs
β β βββ ConnectionType.rs
β β βββ PerformanceMetrics.rs
β β βββ RequestState.rs
β β βββ RequestStatus.rs
β β βββ ResourceUsage.rs
β β βββ ServiceStatus.rs
β βββ Authentication/
β β βββ mod.rs
β β βββ AuthenticationService.rs
β β βββ AuthSession.rs
β β βββ CredentialsStore.rs
β β βββ CryptoKeys.rs
β βββ Binary/
β β βββ mod.rs
β β βββ Binary.rs # Binary initialization
β β βββ Monitor/
β β β βββ StartMonitoring.rs
β β βββ Shutdown/
β β βββ WaitForShutdownSignal.rs
β βββ CLI/
β β βββ mod.rs
β β βββ CliHandler.rs
β β βββ CliParser.rs
β β βββ CommandTypes.rs
β β βββ DaemonClient.rs
β β βββ OutputFormat.rs
β β βββ OutputFormatter.rs
β β βββ ResponseTypes.rs
β β βββ Tests.rs
β βββ Client/
β β βββ mod.rs
β β βββ AirClient/ # Typed gRPC client methods
β β β βββ mod.rs
β β β βββ AirMetrics.rs
β β β βββ AirStatus.rs
β β β βββ ApplyUpdate.rs
β β β βββ Authenticate.rs
β β β βββ CheckForUpdates.rs
β β β βββ DownloadFile.rs
β β β βββ DownloadStream.rs
β β β βββ DownloadStreamChunk.rs
β β β βββ DownloadStreamRpc.rs
β β β βββ DownloadUpdate.rs
β β β βββ ExtendedFileInfo.rs
β β β βββ FileInfo.rs
β β β βββ FileResult.rs
β β β βββ GetConfiguration.rs
β β β βββ GetFileInfo.rs
β β β βββ GetMetrics.rs
β β β βββ GetResourceUsage.rs
β β β βββ GetStatus.rs
β β β βββ HealthCheck.rs
β β β βββ IndexFiles.rs
β β β βββ IndexInfo.rs
β β β βββ ResourceUsage.rs
β β β βββ SearchFiles.rs
β β β βββ SetResourceLimits.rs
β β β βββ UpdateConfiguration.rs
β β β βββ UpdateInfo.rs
β β βββ AirServiceProvider/ # Service provider implementations
β β βββ mod.rs
β β βββ ApplyUpdate.rs
β β βββ Authenticate.rs
β β βββ CheckForUpdates.rs
β β βββ DownloadFile.rs
β β βββ DownloadStream.rs
β β βββ DownloadUpdate.rs
β β βββ GenerateRequestID.rs
β β βββ GetConfiguration.rs
β β βββ GetFileInfo.rs
β β βββ GetMetrics.rs
β β βββ GetResourceUsage.rs
β β βββ GetStatus.rs
β β βββ HealthCheck.rs
β β βββ IndexFiles.rs
β β βββ SearchFiles.rs
β β βββ SetResourceLimits.rs
β β βββ UpdateConfiguration.rs
β βββ Configuration/
β β βββ mod.rs
β β βββ AirConfiguration.rs
β β βββ ConfigurationManager.rs
β β βββ HotReload.rs
β β βββ Schema.rs
β β βββ Tests.rs
β βββ Daemon/
β β βββ mod.rs
β β βββ DaemonManager.rs
β β βββ DaemonStatus.rs
β β βββ ExitCode.rs
β β βββ Platform.rs
β β βββ PlatformInfo.rs
β βββ Downloader/
β β βββ mod.rs
β β βββ DownloadManager.rs
β β βββ RateLimit.rs
β β βββ Types.rs
β βββ HealthCheck/
β β βββ mod.rs
β β βββ DegradationLevel.rs
β β βββ HealthCheckConfig.rs
β β βββ HealthCheckLevel.rs
β β βββ HealthCheckManager.rs
β β βββ HealthCheckRecord.rs
β β βββ HealthCheckResponse.rs
β β βββ HealthStatistics.rs
β β βββ HealthStatus.rs
β β βββ PerformanceIndicators.rs
β β βββ RecoveryAction.rs
β β βββ RecoveryActionType.rs
β β βββ RecoveryTrigger.rs
β β βββ ResourceWarning.rs
β β βββ ResourceWarningType.rs
β β βββ ServiceHealth.rs
β β βββ WarningSeverity.rs
β βββ HTTP/
β β βββ mod.rs
β β βββ Client.rs
β βββ Indexing/
β β βββ mod.rs
β β βββ FileIndexer.rs
β β βββ IndexResult.rs
β β βββ Background/
β β β βββ mod.rs
β β β βββ StartWatcher.rs
β β βββ Language/
β β β βββ mod.rs
β β β βββ ParseRust.rs
β β β βββ ParseTypeScript.rs
β β βββ Process/
β β β βββ mod.rs
β β β βββ ExtractSymbols.rs
β β β βββ ProcessContent.rs
β β βββ Scan/
β β β βββ mod.rs
β β β βββ ScanDirectory.rs
β β β βββ ScanFile.rs
β β βββ State/
β β β βββ mod.rs
β β β βββ CreateState.rs
β β β βββ UpdateState.rs
β β βββ Store/
β β β βββ mod.rs
β β β βββ QueryIndex.rs
β β β βββ StoreEntry.rs
β β β βββ UpdateIndex.rs
β β βββ Watch/
β β βββ mod.rs
β β βββ WatchFile.rs
β βββ Initialize/
β β βββ mod.rs
β β βββ Build/
β β β βββ mod.rs
β β β βββ BuildServer.rs
β β βββ Command/
β β β βββ mod.rs
β β β βββ Connect/
β β β β βββ mod.rs
β β β β βββ ConnectDaemon.rs
β β β βββ HandleCommand.rs
β β β βββ ParseArguments.rs
β β β βββ ValidateCommand.rs
β β βββ Configure/
β β β βββ mod.rs
β β β βββ Log/
β β β β βββ ConfigureLog.rs
β β β βββ Port/
β β β βββ SelectPort.rs
β β βββ Service/
β β βββ mod.rs
β β βββ Auth/
β β β βββ StartAuth.rs
β β βββ Download/
β β β βββ StartDownload.rs
β β βββ Echo/
β β β βββ StartEcho.rs
β β βββ Health/
β β β βββ StartHealthCheck.rs
β β βββ Index/
β β β βββ StartIndex.rs
β β βββ State/
β β β βββ CreateState.rs
β β βββ Update/
β β β βββ StartUpdate.rs
β β βββ Vine/
β β βββ StartService.rs
β βββ Logging/
β β βββ mod.rs
β β βββ ContextLogger.rs
β β βββ LogContext.rs
β β βββ LogManager.rs
β β βββ LogRotationConfig.rs
β β βββ SensitiveDataConfig.rs
β β βββ SensitiveDataFilter.rs
β β βββ StructuredLogEntry.rs
β βββ Metrics/
β β βββ mod.rs
β β βββ AggregationValidator.rs
β β βββ GetMetrics.rs
β β βββ MetricGuard.rs
β β βββ MetricsCollector.rs
β β βββ MetricsData.rs
β β βββ MinMaxUpdate.rs
β βββ Mountain/
β β βββ mod.rs
β β βββ Constants.rs
β β βββ MountainClient.rs
β β βββ MountainClientConfig.rs
β β βββ TlsConfig.rs
β βββ Plugins/
β β βββ mod.rs
β β βββ ApiVersion.rs
β β βββ EventBus.rs
β β βββ Plugin.rs
β β βββ PluginCapability.rs
β β βββ PluginDependency.rs
β β βββ PluginDiscoveryResult.rs
β β βββ PluginHooks.rs
β β βββ PluginInfo.rs
β β βββ PluginLoader.rs
β β βββ PluginManager.rs
β β βββ PluginManifest.rs
β β βββ PluginMessage.rs
β β βββ PluginMetadata.rs
β β βββ PluginPermission.rs
β β βββ PluginRegistry.rs
β β βββ PluginSandboxConfig.rs
β β βββ PluginSandboxManager.rs
β β βββ PluginState.rs
β β βββ PluginValidationResult.rs
β β βββ Test.rs
β βββ Resilience/
β β βββ mod.rs
β β βββ BulkheadConfig.rs
β β βββ BulkheadExecutor.rs
β β βββ BulkheadStatistics.rs
β β βββ CircuitBreaker.rs
β β βββ CircuitBreakerConfig.rs
β β βββ CircuitEvent.rs
β β βββ CircuitState.rs
β β βββ CircuitStatistics.rs
β β βββ ResilienceOrchestrator.rs
β β βββ ResilienceTests.rs
β β βββ Retry.rs
β β βββ Timeout.rs
β βββ Security/
β β βββ mod.rs
β β βββ ChecksumVerifier.rs
β β βββ RateLimitConfig.rs
β β βββ RateLimiter.rs
β β βββ RateLimitStatus.rs
β β βββ SecureBytes.rs
β β βββ SecureStorage.rs
β β βββ SecurityAuditor.rs
β β βββ SecurityEvent.rs
β β βββ SecurityEventType.rs
β β βββ SecuritySeverity.rs
β β βββ SecurityTests.rs
β β βββ TokenBucket.rs
β βββ Tracing/
β β βββ mod.rs
β β βββ PropagationContext.rs
β β βββ SamplingConfig.rs
β β βββ SpanEvent.rs
β β βββ SpanStatus.rs
β β βββ TraceGenerator.rs
β β βββ TraceMetadata.rs
β β βββ TraceSpan.rs
β β βββ TraceStatistics.rs
β βββ Updates/
β β βββ mod.rs
β β βββ ChecksumUtil.rs
β β βββ DownloadSession.rs
β β βββ InstallationStatus.rs
β β βββ PackageFormat.rs
β β βββ PlatformConfig.rs
β β βββ PlatformDetect.rs
β β βββ PlatformMetadata.rs
β β βββ RollbackHistory.rs
β β βββ RollbackState.rs
β β βββ Types.rs
β β βββ UpdateChannel.rs
β β βββ UpdateInfo.rs
β β βββ UpdateManager.rs
β β βββ UpdateStatus.rs
β β βββ UpdateTelemetry.rs
β β βββ VersionCompare.rs
β βββ Vine/
β βββ mod.rs
β βββ Error.rs
β βββ Generated/
β β βββ mod.rs
β β βββ air.rs
β βββ Server/
β βββ mod.rs
β βββ AirVinegRPCService.rs
βββ Documentation/
βββ GitHub/
β βββ Architecture.md
β βββ DeepDive.md
βββ Rust/
βββ doc/ # Cargo doc output
Airβπͺ is the persistent background daemon for the Land
ecosystem. It communicates with Mountainββ°οΈ via
VineβπΏ (gRPC) on port [::1]:50053 and uses
Mistβπ«οΈ for DNS isolation on its HTTP client.
| Role | Details |
|---|---|
| Daemon Process | Persistent executable that runs independently of the main window, even after the window closes |
| Server Host | Hosts a local gRPC server on [::1]:50053 to accept commands from Mountainββ°οΈ |
| Update Delegate | Sole authority for modifying installation files of the parent application |
| Signer | Handles cryptographic signing of artifacts and secure token storage for user login |
| Traffic Manager | Proxy/downloader that keeps large network operations off the main renderer process |
| File Indexer | Maintains a persistent file index with symbol extraction and fast search across the workspace |
| Health Monitor | Periodically checks all service health with automatic recovery and degradation tracking |
| Process | Port | Protocol | Purpose |
|---|---|---|---|
| Airβπͺ | 50053 |
VineβπΏ / Proto/Air.proto (gRPC) |
Daemon services - updates, downloads, indexing |
| Cocoonβπ¦ | 50052 |
Proto/Vine.proto (gRPC) |
VS Code extension hosting |
Proto/Air.proto is this repository's own contract and generates the daemon's
service surface. Proto/Vine.proto is not a file in this repository - it
lives in the
VineβπΏ repository
and is named here only to identify what occupies the neighbouring port.
Air is part of the networking/IPC connectivity stack alongside
Mistβπ«οΈ (DNS isolation) and VineβπΏ (gRPC
protocol layer).
The remaining Elements sit outside the daemon's runtime path. Air neither imports them nor opens a socket to them, and they are listed here so the boundary is explicit rather than merely unmentioned:
| Element | Responsibility | Relationship to Airβπͺ |
|---|---|---|
| Cacheβπ¦ | Process-wide caching primitives | Runs inside Mountainββ°οΈ, not the daemon |
| Maintainβπͺπ» | Build system, dead-code eliminator and development runner | Build-time only - never linked into the daemon binary |
| Outputββ« | Build output and artifact management | Produces the artifacts Air later downloads and verifies |
| Restββ±οΈ | JS bundler configuration |
Build-time only - no runtime surface |
| Skyβπ | Astro-based UI component layer |
Renders in the window; reaches Air only via Mountainββ°οΈ |
| Windβπ | TypeScript/Effect-TS service layer |
Peer service layer on the TypeScript side |
| Workerβπ© | Service worker - asset caching, offline support, dynamic CSS |
Browser-context worker, unrelated to the native daemon |
Note
This table is a boundary statement: everything above is deliberately absent
from the daemon's dependency graph in Cargo.toml.
Typical usage flow:
- Spawn: Mountainββ°οΈ detects if Airβπͺ is running. If not, it spawns the binary.
- Connect: Mountainββ°οΈ establishes a
VineβπΏ (
gRPC) connection to Airβπͺ's local port[::1]:50053. - Delegate: When a user requests an update or large download, Mountainββ°οΈ sends a command to Airβπͺ and immediately returns control to the user.
- Monitor: Airβπͺ emits progress events back to Mountainββ°οΈ to update the UI status bars.
Rust1.95.0 or later (edition 2024)- Protocol Buffer compiler (included via
tonic-buildbuild dependency)
cd Element/Air
cargo build --release# Run with default settings
./Target/release/Air
# Or via cargo
cargo run --bin Air| Feature | Description |
|---|---|
default |
Enables full-services and mtls |
full-services |
Enables authentication, updates, downloader, indexing |
authentication |
Token management and credential storage |
updates |
Update lifecycle management |
downloader |
Parallel chunked downloads with resume |
indexing |
File indexing with symbol extraction |
mtls |
Mutual TLS for gRPC connections |
appimage |
AppImage package format support |
deb |
Debian package format support |
rpm |
RPM package format support |
# Default features (full-services + `mTLS`)
cargo build --release
# Minimal daemon (no update/auth/indexing)
cargo build --release --no-default-features
# All features
cargo build --release --all-features| Crate / Package | Purpose |
|---|---|
tonic / prost |
gRPC server and Protocol Buffer code generation |
| VineβπΏ | Local path dependency - generated Proto/Air.proto gRPC contracts |
| Commonβπ§π»βπ | Local path dependency - shared types and abstractions |
| Mistβπ«οΈ | Local path dependency - DNS isolation for HTTP client |
reqwest / rustls |
HTTPS downloads with TLS certificate verification |
tokio |
Async runtime for concurrent I/O and task scheduling |
notify / ignore |
File system event watching for real-time index updates |
ring / zeroize |
Cryptographic signing and secure credential storage |
tracing |
Structured JSON logging with span propagation |
config / toml |
Configuration file loading with hot-reload support |
sysinfo / systemstat |
System resource monitoring and health checks |
walkdir / ignore |
Recursive directory traversal for file indexing |
Air enforces security at multiple layers, isolating sensitive operations from the main application process:
| Layer | Mechanism |
|---|---|
| Process Isolation | Separate daemon process - cryptographic and auth logic never runs in the renderer |
| Network | mTLS for gRPC connections, Mistβπ«οΈ DNS isolation for outbound HTTP |
| Credentials | AEAD encryption via ring, zeroize-protected memory, key rotation |
| Rate Limiting | Token bucket algorithm per-endpoint rate limiting |
| Checksum Verification | All downloaded artifacts verified via SHA-256 / MD5 before installation |
| Audit Logging | Security audit subsystem with severity-classified events |
| Singleton Enforcement | PID locking prevents duplicate daemon instances |
Air is designed to be compatible with:
| Target | Integration |
|---|---|
| Mountainββ°οΈ | Communicates via gRPC on port 50053 - delegates updates, downloads, indexing, auth |
| VineβπΏ | Uses Proto/Air.proto gRPC contracts for all inter-process communication |
| Mistβπ«οΈ | Uses DNS isolation for all outbound HTTP requests |
| Cocoonβπ¦ | Shares port allocation awareness - Cocoon occupies port 50052, Air occupies 50053 |
| Echoβπ£ | StartEcho service initializes Echo task scheduling within the daemon process |
- Rust API Documentationβπ
- Deep Dive
- Detailed startup sequence,
gRPCrouting, and data flow
- Detailed startup sequence,
- Architecture Overview
- Internal module structure
- Deep Dive
- In-depth technical details
- Land Documentation - Complete documentation index
- Mountainββ°οΈ - Main application process - GitHub
- Mistβπ«οΈ - DNS isolation for the private network - GitHub
- VineβπΏ -
gRPCprotocol layer - GitHub - Cocoonβπ¦ - Node.js/
Effect-TSextension host - GitHub - Groveβπ³ -
Rust/WASMextension host - GitHub - Echoβπ£ - Task scheduler - GitHub
- Commonβπ§π»βπ - Shared types and abstractions - GitHub
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.
LandβποΈ is proud to be an open-source endeavor. Our journey is significantly supported by the organizations and projects that believe in the future of open-source software.
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.
| Land | PlayForm | NLnet | NGI0 Commons Fund |
|---|---|---|---|
|
|
|
|
|
Project Maintainers: Source Open (Source/Open@editor.land) | GitHub Repository | Report an Issue | Security Policy