Skip to content

Air 🪁 + Land 🏞️

License

Notifications You must be signed in to change notification settings

CodeEditorLand/Air

Air

🪁

+

🏞️


Air 🪁 The Native Background Daemon for Land 🏞️

License: CC0-1.0 Crates.io Rust Version

Welcome to Air, 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, and cryptographic signing.

Air acts as the silent partner to Mountain, providing a robust server environment that persists even when the main editor window is closed, enabling seamless background updates and persistent state management.


Key Features 🔐

  • Native Sidecar Architecture: Runs as a standalone process alongside the main Mountain application, communicating via high-performance IPC (gRPC/Vine) to handle requests without blocking the UI thread.
  • Dedicated Update Management: Takes full control of the update lifecycle, including downloading, verifying, and applying patches for Land, ensuring the editor is always up-to-date without user interruption.
  • Isolated Authentication & Signing: Manages sensitive cryptographic operations, including binary signing and secure login flows, keeping security logic isolated from the main application view.
  • Background Downloader: Implements a resilient download manager for extensions, language servers, and dependencies, capable of pausing, resuming, and handling network interruptions gracefully.
  • Resource Offloading: Acts as the designated handler for any "heavy" task that doesn't strictly require the main application loop, effectively decoupling infrastructure maintenance from the user experience.

System Architecture Diagram 🏗️

This diagram illustrates how Air sits alongside Mountain to handle background operations.

graph LR
    classDef mountain fill:#f9f,stroke:#333,stroke-width:2px;
    classDef air fill:#9cf,stroke:#333,stroke-width:2px;
    classDef external fill:#ddd,stroke:#666,stroke-dasharray: 5 5;

    subgraph "Land Runtime Ecosystem"
        direction TB

        subgraph "Mountain ⛰️ (Main App)"
            UI[User Interface]:::mountain
            CoreLogic[Core Logic]:::mountain
            CoreLogic -- Requests Task --> IPC_Client
        end

        subgraph "Air 🪁 (Daemon Sidecar)"
            IPC_Server[gRPC Server]:::air
            UpdateMgr[Update Manager]:::air
            Downloader[Resilient Downloader]:::air
            AuthService[Signer & Auth]:::air

            IPC_Server -- Routes to --> UpdateMgr
            IPC_Server -- Routes to --> Downloader
            IPC_Server -- Routes to --> AuthService
        end

        IPC_Client -- IPC (Vine Protocol) --> IPC_Server
    end

    subgraph "External World"
        Cloud[Update Servers / Registry]:::external
    end

    UpdateMgr -- Fetches --> Cloud
    Downloader -- Downloads --> Cloud
Loading

Air in the Land Ecosystem 🪁 + 🏞️

Component Role & Key Responsibilities
Daemon Process The persistent executable that runs independently of the main window.
Server Host Hosts a local server to accept commands from Mountain or other authorized clients.
Update Delegate The sole authority for modifying the installation files of the parent application.
Signer Handles cryptographic signing of artifacts and secure token storage for user login.
Traffic Manager Acts as a proxy/downloader to keep network load off the main renderer process.

Getting Started 🚀

Installation

To add Air to your project workspace:

[dependencies]
Air = { git = "https://github.com/CodeEditorLand/Air.git", branch = "Current" }

Usage Pattern

Air is typically spawned automatically by Mountain during the startup phase.

  1. Spawn: Mountain detects if Air is running. If not, it spawns the binary.
  2. Connect: Mountain establishes a Vine (gRPC) connection to Air's local port [::1]:50053 (reserved for Air, separate from Cocoon's port 50052).
  3. Delegate: When a user requests an update or a large download, Mountain sends a command to Air and immediately returns control to the user.
  4. Monitor: Air emits progress events back to Mountain to update the UI status bars.

Port Allocation

  • Air: Port 50053 (Vine/air.proto protocol - Air daemon services)
  • Cocoon: Port 50052 (Vine.proto protocol - VS Code extension hosting)

License ⚖️

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.


Changelog 📜

Stay updated with our progress! See CHANGELOG.md for a history of changes specific to Air.


Funding & Acknowledgements 🙏🏻

Air 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.

Land PlayForm NLnet NGI0 Commons Fund
Land PlayForm NLnet NGI0 Commons Fund

Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy

About

Air 🪁 + Land 🏞️

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published