|
|
Common 🧑🏻🏭 |
|
Echo 📣 |
|
|
Vine 🌿 |
|
Mountain ⛰️ |
|
|
Rest ⛱️ |
|
Output ⚫ |
|
|
Cocoon 🦋 |
|
Wind 🍃 |
|
|
Worker 🍩 |
|
Sky 🌌 |
|
|
Mist 🌫️ |
|
Maintain 💪🏻 |
|
|
Grove 🌳 |
|
Land 🏞️ |
|
|
Editor 💻 |
|
Element 🌱 |
- Project Identity
- Orientation
- Overview
- Key Features and Architectural Highlights
- The Effect System in One Type
- The gRPC Contract
- Core Architecture
- The Request Dispatcher
- The UI Bridge
- Architectural Workflows
- Workflow Index
- Work in Progress Workflows
- Future Vision: The
GroveNative Extension Host - Project Structure Overview
- Elements Not Yet in the Table Above
- A Correction to the
MistRow - Reference Links
- System Architecture Diagram
- Getting Started
- Submodule Structure
- Build Profiles
- License
- Changelog
- Funding and Acknowledgements
- Related Documentation
The full documentation set is catalogued in the Documentation/INDEX.md master index.
Documentation/INDEX.md- entry point for the whole setDocumentation/GitHub/README.md- catalogue of theDocumentation/GitHub/documents
The master index groups its links by purpose:
- System guides
- Build and configuration references
- Workflow examples
- Filesystem footprint notes
- Module notes
- Per-Element architecture documents
- Editor.
Landis a high-performance, resource-efficient, cross-platform code editor. - Relationship to
VS Code. It keeps the shape of theVS Codeworkbench and theVS Codeextension API. - Runtime. It replaces the runtime underneath with
Rust,TauriandEffect-TS. - Umbrella project. This repository -
CodeEditorLand/Land- carries no editor logic of its own. - Carried artifacts.
- The
Cargo.tomlandpnpm-workspace.yamlworkspace manifests - The build scripts
- The architecture documentation
- The submodule pointers that pin every Element at a known revision
- The
graph TB
Land["Land (umbrella repository)"]
Manifests["Cargo.toml + pnpm-workspace.yaml"]
Scripts["Build scripts"]
Docs["Architecture documentation"]
Pointers["Submodule pointers"]
Land --> Manifests
Land --> Scripts
Land --> Docs
Land --> Pointers
- Each Element listed in the badge grid above is a separate GitHub repository under the
CodeEditorLandorganisation. Landchecks them out as submodules and compiles them into one application.
Path in Land |
What lives there |
|---|---|
Element/ |
Every Element, each one its own Git repository |
Dependency/ |
Vendored upstreams: Microsoft, Tauri, SWC, OXC, Biome and Rolldown |
Documentation/ |
Architecture notes, workflow walkthroughs and module deep dives |
Maintain/ |
Build, debug, release and repository scripts |
Cargo.toml |
The Rust workspace that unifies every Rust Element |
pnpm-workspace.yaml |
The pnpm workspace that unifies every TypeScript Element |
| If you want to | Read |
|---|---|
| See the whole component map | The Core Architecture table further down this page |
| Follow a request end to end | Documentation/GitHub/Workflow.md |
| Understand the layering | Documentation/GitHub/Architecture.md |
| Build it locally | The Getting Started section further down this page |
| Read one Element in depth | That Element's own repository, linked from the Project Structure Overview table |
| Browse the documentation index | Documentation/GitHub/README.md |
| Follow a build from source | Documentation/GitHub/Building.md |
- Welcome. We are building a high-performance, resource-efficient and cross-platform code editor.
- Inspiration. The architecture of
VS Code, re-imagined with a modern, declarative and type-safe stack. - Native backend.
RustandTauripower the native backend (Mountain). - Application logic.
TypeScriptwithEffect-TSpowers all application logic (WindandCocoon). - Vision. A lightning-fast and deeply reliable editing experience through declarative, effects-based programming across the entire application.
- Side effects. Filesystem operations, UI updates and network requests are handled in a structured, testable and composable way.
graph TB
Workbench["VS Code workbench shape + extension API"]
Editor["Land editor"]
Native["Native backend: Rust + Tauri (Mountain)"]
Logic["Application logic: TypeScript + Effect-TS (Wind + Cocoon)"]
Effects["Effects-based programming"]
Workbench --> Editor
Native --> Editor
Logic --> Editor
Effects --> Native
Effects --> Logic
- Declarative Effect System.
- The entire application, from the
Rustbackend to theTypeScriptfrontend, is built on an effects-based architecture. - A custom
ActionEffectsystem is used inRustandEffect-TSis used inTypeScript. - The result is compile-time guarantees for error handling, resource management and asynchronicity, leading to exceptional stability.
- The entire application, from the
- High-Performance Backend.
- The
Mountainbackend is written inRust. - It provides native speed for core operations: file I/O, search and process management.
- The
- High-Fidelity Extension Host.
- The
Cocoonsidecar is aNode.jsprocess designed to run existingVS Codeextensions with high compatibility. - It provides a sandboxed
vscodeAPI, built withEffect-TS, that communicates withMountainfor all native operations.
- The
- Modern UI Services.
- The
Windproject is a from-scratch,Effect-TSnative re-implementation of theVS Codeworkbench services. - It provides a clean, functional and testable foundation for the UI.
- The
- Strongly-Typed IPC.
- All communication between the
Mountainbackend and theCocoonextension host is handled viagRPC. - The API contract is robust, performant, strongly typed and defined in a
.protofile.
- All communication between the
graph LR
Common["Common (traits + ActionEffect)"]
Mountain["Mountain (native backend)"]
Cocoon["Cocoon (extension host)"]
Wind["Wind (UI services)"]
Sky["Sky (UI components)"]
Common --> Mountain
Mountain --> Cocoon
Mountain --> Wind
Wind --> Sky
- Every privileged operation in the
Rusthalf of the editor is expressed as anActionEffect. - An
ActionEffectis a closure plus the capability it needs, held as a value until a runtime chooses to run it. - Source:
Element/Common/Source/Effect/ActionEffect.rs
pub struct ActionEffect<TCapability, TError, TOutput> {
pub Function:
Arc<dyn Fn(TCapability) -> Pin<Box<dyn Future<Output = Result<TOutput, TError>> + Send>> + Send + Sync>,
}Note
The capability parameter is what makes an effect testable - swap the capability and the same effect runs against a fake filesystem.
Vineowns the wire format betweenMountainandCocoon.- The service definition is the single source of truth.
- Both the
Rustserver and theTypeScriptclient are produced from that definition. - Source:
Element/Vine/Proto/Vine.proto
service MountainService {
rpc ProcessCocoonRequest(GenericRequest) returns (GenericResponse);
rpc OpenChannelFromCocoon(stream Envelope) returns (stream Envelope);
}sequenceDiagram
participant Mountain
participant Vine as Vine protocol
participant Cocoon
Mountain->>Vine: ProcessCocoonRequest (unary)
Vine-->>Cocoon: GenericResponse
Cocoon->>Vine: OpenChannelFromCocoon (stream)
Vine-->>Mountain: Envelope frames by correlation_id
Note
The unary call remains for single round-trips; the bidirectional stream
multiplexes concurrent traffic and routes frames by correlation_id.
Land's architecture is composed of several key components that work in concert to deliver a modern editing experience.
| Component | Role and Key Responsibilities | Primary Technologies |
|---|---|---|
Common (Rust) |
The Abstract Core Library. Defines the application's "language". It contains all abstract trait definitions, the ActionEffect system, and Data Transfer Objects (DTOs). It has no knowledge of the final implementation. |
Rust |
Mountain (Rust) |
The Native Backend. A Tauri application that implements the traits from Common. It manages native OS operations, hosts the gRPC server, manages the Cocoon process, and communicates with the Wind UI via Tauri events. |
Rust, Tauri, Tokio, tonic (gRPC) |
Cocoon (TypeScript) |
The Extension Host. A Node.js process that provides a high-fidelity vscode API to extensions. It is built entirely with Effect-TS and communicates with Mountain via gRPC for all privileged operations. |
TypeScript, Node.js, Effect-TS, gRPC |
Wind and Sky (TypeScript) |
The UI Layer. Wind is the Effect-TS native re-implementation of the VS Code workbench services. Sky is the UI component layer that renders the state managed by Wind. Wind communicates with Mountain via Tauri events. |
TypeScript, Effect-TS |
graph TB
Common["Common (abstract core)"]
Mountain["Mountain (native backend)"]
Cocoon["Cocoon (extension host)"]
Wind["Wind (UI services)"]
Sky["Sky (UI components)"]
Common --> Mountain
Mountain --> Cocoon
Mountain --> Wind
Wind --> Sky
- Requests arriving from either direction land in
Mountain'sTrackmodule. - The
Trackmodule turns a method name into a typed effect and hands it to the runtime. - Source:
Element/Mountain/Source/Track/mod.rs
//! Central request dispatcher that routes commands from the Sky frontend and
//! Cocoon sidecar into strongly-typed ActionEffects executed by the runtime.
pub mod FrontendCommand;
pub mod SideCarRequest;Note
One dispatcher serves both callers, which is why a command behaves identically whether the UI or an extension issued it.
- On the webview side,
Windsubstitutes its own transport for theElectronIPC serviceVS Codeexpects. - Unmodified workbench code therefore reaches
Mountain. - Source:
Element/Wind/Source/Service/TauriMainProcessService.ts
/**
* Drop-in replacement for VS Code's ElectronIPCMainProcessService.
* Routes channel.call() through Tauri invoke to Mountain's WindServiceHandlers.
*/Note
Because the seam is the channel interface, the workbench above it needs no
Tauri-specific changes.
- To understand how these components interact, refer to the detailed workflow descriptions in
Documentation/GitHub/Workflow.md. - The sections below provide a table of contents for these essential processes.
- Application Startup and Handshake. Describes the complete end-to-end process of launching
Mountain, spawningCocoon, and establishing a stable, initialized state for both the UI and the extension host. - Opening a File from the UI. Details the flow from a user clicking a file in the explorer to the content being read from disk by
Mountainand rendered in an editor byWind. - Invoking a Language Feature (Hover Provider). A key example of bi-directional communication, showing how an extension in
Cocoonregisters a feature,Mountainorchestrates the request, and the result is displayed in theWindUI. - Saving a File with Save Participants. Explains the advanced process of intercepting a save event, allowing an extension in
Cocoonto modify a file (e.g., for formatting) beforeMountainwrites it to disk. - Executing a Command from the Command Palette. Illustrates the unified command system, showing how
Mountain's command registry can seamlessly dispatch execution to either a nativeRusthandler or a proxied command inCocoon. - Creating and Interacting with a Webview Panel. Details the full lifecycle of extension-contributed UI, from
Cocoonrequesting a panel toMountainmanaging the native webview window and proxying messages back and forth. - Creating and Interacting with an Integrated Terminal. A deep dive into native process management, showing how
Mountainspawns a PTY process and streams its I/O to both theWindfrontend and theCocoonextension host. - Source Control Management (SCM). Outlines how the built-in Git extension in
CocoonusesMountainas a service to run nativegitcommands and then populates the SCM view in the UI with the results. - User Data Synchronization. Describes the end-to-end process of syncing user settings. It covers user authentication, fetching data from a remote store, performing a three-way merge, applying changes locally, and notifying all parts of the application.
- Running Extension Tests. Explains the "Extension Development Host" approach, where a second, isolated instance of the application is launched to run tests, with the test
Cocooninstance remote-controlling the main UI.
sequenceDiagram
participant Launch
participant Mountain
participant Cocoon
participant Wind
Launch->>Mountain: start
Mountain->>Cocoon: spawn
Mountain->>Wind: initialize UI
Cocoon-->>Mountain: ready
Wind-->>Mountain: ready
The following workflows are implemented in the codebase but are pending detailed documentation.
- Tree View Data Flow
- Custom Editor Lifecycle
- Debugging Session Lifecycle
- Task Execution
- While
Cocoonprovides high compatibility with the existingVS Codeecosystem, our long-term vision includesGrove, a nativeRustextension host. Groveaims to provide a highly optimized, secure and performant environment for extensions written inRustor compiled toWASM.- It drastically reduces the overhead of a
Node.jsruntime and enables deeper integration withMountain. - Work has started: the repository already carries a host, a
WASMruntime layer, a transport layer and its own protocol definition. - Source:
Element/Grove/Source/Library.rs
//! Grove provides a secure, sandboxed environment for running VS Code
//! extensions compiled to WebAssembly or native Rust. It complements the
//! Node.js-based extension host (Cocoon) by offering a native extension
//! host with full WASM support via WASMtime.
Note
Grove complements Cocoon rather than replacing it - the Node.js host
stays for extensions that need the npm ecosystem.
- Our codebase is organized into "Elements", each representing a distinct component or library with a clear purpose.
- Most Elements are managed as Git submodules within the main
Landrepository, allowing for independent development and versioning.
| Path | Component and Purpose | |
|---|---|---|
| 🧑🏻🏭 | Land/Element/Common |
The Abstract Core Library (Rust). This is the architectural heart of the native backend. It contains no concrete logic, only trait definitions, the ActionEffect system, and shared Data Transfer Objects (DTOs). All other Rust components depend on it. |
| 📣 | Land/Element/Echo |
The High-Performance Task Scheduler (Rust). A complete Rust library that provides a structured concurrency runtime. It features a high-performance, work-stealing queue and is designed to be the core execution engine for all asynchronous tasks within Mountain. |
| 🌿 | Land/Element/Vine |
The gRPC Protocol and Implementation. This element contains the .proto file defining the gRPC contract between Mountain and Cocoon. It also includes the code produced from that definition and the concrete Rust server/client implementations within the Mountain and Cocoon projects. |
| ⛰️ | Land/Element/Mountain |
The Native Backend Application (Rust). This is the main Tauri application. It implements the traits from Common, manages the application window, orchestrates native OS operations, hosts the gRPC server, and manages the lifecycle of all sidecar processes. |
| 💻 | Editor |
The VS Code Source Submodule. Contains a specific version of the Microsoft VS Code source code. This is a critical dependency used by Rest to build Cocoon's runtime and by Wind to leverage VS Code's core UI components and services. |
| ⛱️ | Land/Element/Rest |
The JS Bundler Configuration. This element contains the build scripts and configurations (e.g., for esbuild) used to bundle the necessary VS Code platform code from the Dependency submodule for Cocoon to consume. |
| ⚫ | Land/Element/Output |
The Bundled JS Output. This directory is the destination for the bundled JavaScript artifacts created by the Rest build process. It is the code that Cocoon actually loads at runtime. |
| 🦋 | Land/Element/Cocoon |
The Node.js Extension Host (TypeScript). A sidecar process that runs standard VS Code extensions. It is built entirely with Effect-TS and provides a high-fidelity vscode API, proxying privileged calls to Mountain via gRPC. |
| 🍃 | Land/Element/Wind |
The UI Service Layer (TypeScript). A complete, Effect-TS native re-implementation of the VS Code workbench services. It runs in the Tauri webview and manages the entire state and logic of the user interface. |
| 🍩 | Land/Element/Worker |
Web Worker Implementations. This element holds the source code for any dedicated web workers used by the Wind/Sky frontend for computationally intensive tasks. |
| 🌌 | Land/Element/Sky |
The UI Component Layer (Astro). This project contains the actual UI components that render the editor, side bar, status bar, etc. It is driven by the state managed in the Wind service layer. |
| 🌫️ | Land/Element/Mist |
WebSocket Communication Logic. This component handles WebSocket communication. It can be implemented either as a native module within Mountain or as a separate sidecar. |
| 💪🏻 | Land/Element/Maintain |
Project Maintenance and CI/CD. Contains development utilities, GritQL queries for automated refactoring, CI/CD pipeline configurations, and other maintenance scripts. |
| 🌳 | Land/Element/Grove |
(Future Vision) The Native Rust Extension Host. A planned project to build a high-performance, secure extension host in Rust, capable of running extensions compiled to WASM or statically linked as a Rust library. |
graph TB
Land["Land"]
Native["Rust Elements: Common, Echo, Vine, Mountain, Air, Cache, Mist, SideCar, Maintain, Grove"]
TypeScript["TypeScript Elements: Cocoon, Wind, Sky, Worker"]
Build["Build Elements: Rest, Output"]
Vendor["Dependency: Microsoft, Tauri, SWC, OXC, Biome, Rolldown"]
Docs["Documentation + Maintain"]
Land --> Native
Land --> TypeScript
Land --> Build
Land --> Vendor
Land --> Docs
- Three further Elements are checked out as submodules and compiled into the application.
- They are recorded here so the list matches the tree.
| Element | Purpose |
|---|---|
Land/Element/Air 🪁 |
The Background Daemon (Rust). Handles updates, downloads, crypto signing and file indexing off the editor's critical path. |
Land/Element/Cache 📦 |
Process-Wide Caching Primitives (Rust). An mmap cache for bundled static assets and a canonical-path cache for security gates. |
Land/Element/SideCar 🚃 |
The Prebuilt Node.js Sidecar (Rust). Ships the exact Node.js binary per target triple so Cocoon never depends on a system install. |
Source: Element/Cache/Source/Library.rs
//! - [`AssetMemoryMap`] - file-backed mmap cache for bundled static assets.
//! - [`PathCanon`] - process-wide canonical-path cache. Collapses repeated
//! `dunce::canonicalize` calls used by fs-scope security gates.
Note
Both caches are optional; disabling them costs speed, not correctness.
- The table above describes
Mistas WebSocket communication logic. That is only half of it. Mistalso serves a private DNS catalog soLand's components can find each other on*.editor.landwithout touching the public internet.- Source:
Element/Mist/Source/Server.rs
//! Builds and serves the private DNS catalog for CodeEditorLand.
//! Binds exclusively to loopback (`127.0.0.1`) to prevent LAN exposure.
Note
Loopback-only binding is deliberate: the catalog is never reachable from the local network.
This diagram illustrates the build-time and runtime interactions between the primary components of the Land application.
graph LR
VSCodeSource["VS Code Source (Dependency/Editor)"]
RestBuild["JS Bundler (Rest Element)"]
CocoonBundleJS("Cocoon Runtime JS")
SkyBuildProcess["Sky Build (Sky Element)"]
SkyAssets("Sky Frontend Assets")
VSCodeSource --> RestBuild
VSCodeSource -- Uses UI code --> SkyBuildProcess
RestBuild --> CocoonBundleJS
SkyBuildProcess --> SkyAssets
graph TB
subgraph Native["Native Backend (Rust)"]
Mountain["Mountain (Tauri App)"]
CommonCrate["Common Crate"]
TrackDispatcher["Track Dispatcher"]
VineGRPCServer["Vine gRPC Server"]
NativeHandlers["Native Logic Handlers"]
ProcessMgmt["Process Management"]
end
subgraph UI["UI Frontend (Tauri Webview)"]
WindServices["Wind (Effect-TS Services)"]
SkyUI["Sky (UI Components)"]
end
subgraph Host["Extension Host (Node.js Sidecar)"]
Cocoon["Cocoon Process"]
VineGRPCClient["Vine gRPC Client"]
VSCodeAPI["vscode API Shim"]
Extension["Extension Code"]
end
Mountain --> TrackDispatcher
TrackDispatcher --> NativeHandlers
Mountain --> CommonCrate
Mountain --> VineGRPCServer
Mountain --> ProcessMgmt
WindServices --> SkyUI
ProcessMgmt --> Cocoon
WindServices --> TrackDispatcher
VineGRPCClient <--> VineGRPCServer
Cocoon --> VineGRPCClient
Cocoon --> VSCodeAPI
VSCodeAPI --> Extension
Important
The build is a two-step linear flow.
- Do NOT pull submodules recursively.
- Each submodule is managed independently on its own branch.
graph LR
Step1["Step 1: Compile VS Code Source (Node 24)"]
Step2["Step 2: Build Land Application"]
Step1 --> Step2
- This step is mandatory and must be done before Step 2.
Node 24is required for this step.- The exact version is pinned in
Dependency/Microsoft/Dependency/Editor/.nvmrc.
cd Dependency/Microsoft/Dependency/Editor
nvm use 24
git fetch --all
git reset --hard Parent/main
git clean -dfx
pnpm install
pnpm run compile
pnpm run compile-extensions-buildcd Land # back to repository root
export Trace=all Record=1 Disable=false
./Maintain/Debug/Build.sh --profile debug-electron-bundled| Element | Submodule Repository |
|---|---|
Common |
github.com/CodeEditorLand/Common |
Mountain |
github.com/CodeEditorLand/Mountain |
Sky |
github.com/CodeEditorLand/Sky |
Wind |
github.com/CodeEditorLand/Wind |
Cocoon |
github.com/CodeEditorLand/Cocoon |
Rest |
github.com/CodeEditorLand/Rest |
Output |
github.com/CodeEditorLand/Output |
Dependency |
github.com/CodeEditorLand/Dependency |
Editor |
github.com/CodeEditorLand/Editor (inside Dependency) |
- Clone each submodule individually on its target branch.
- Do NOT use
git clone --recurse-submodules.
Important
Element is itself a repository. The remaining Elements - Air, Cache,
Echo, Grove, Maintain, Mist, SideCar, Vine and Worker - are
registered in
Element/.gitmodules,
not in the root manifest.
| Profile | Use Case |
|---|---|
debug-electron-bundled |
Full bundled Electron debug build |
debug-electron-unbundled |
Electron debug without bundling |
- Run the build from the
Landrepository root after completing Step 1.
Warning
Maintain/Debug/Build.sh accepts fifteen profile names and debug-electron-unbundled is not among them.
The unbundled Electron build is spelled debug-electron.
Terminal
sh Maintain/Debug/Build.sh --helpNote
The script prints the full profile list, from debug through
debug-bundled-all, so the accepted names never have to be guessed.
- 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
LICENSEfile.
- Stay updated with our progress.
- See
CHANGELOG.mdfor 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.
graph LR
EC["European Commission (Next Generation Internet)"]
NLnet["NLnet"]
Fund["NGI0 Commons Fund"]
Land["Land"]
EC --> NLnet
NLnet --> Fund
Fund --> Land
| Land | PlayForm | NLnet | NGI0 Commons Fund |
|---|---|---|---|
|
|
|
|
|
- This project would not be possible without the incredible work of the open-source community.
- We are especially grateful for the following foundational technologies and projects.
| Technology | What it provides |
|---|---|
| Tauri | A secure, performant and resource-efficient framework for building our native desktop application with a web frontend. |
| Microsoft Visual Studio Code | Open-sourced workbench UI and platform code, which provides the foundation for our user interface and extension host compatibility. |
| Effect-TS | A robust, type-safe and declarative application with a powerful structured concurrency and dependency management system in TypeScript. |
| Rust | The performance, safety and modern tooling that powers our entire native backend. |
| Tokio and Tonic | The asynchronous runtime and gRPC framework that are the backbone of our high-performance IPC. |
| Astro | A content-driven approach that allows us to build a fast and modern user interface for the Sky component. |
| PNPM | Efficient and reliable management of our JavaScript dependencies. |
| and many many more... |
- We extend our sincere gratitude to the maintainers and contributors of these and all the other dependencies we use. ❤️
Documentation/GitHub/README.md- documentation index for the whole systemDocumentation/GitHub/Architecture.md- system layering and component relationshipsDocumentation/GitHub/Building.md- build instructions and profilesDocumentation/GitHub/Workflow.md- end-to-end architectural workflows
Project Maintainers: Source Open (Source/Open@Editor.Land) | GitHub Repository | Report an Issue | Security Policy