Land 🏞️
Verified
We've verified that the organizationCodeEditorLand controls the domain:
- editor.land
Welcome toLand! We are building a high-performance, resource-efficient, andcross-platform code editor inspired by the architecture of VS Code, butre-imagined with a modern, declarative, and type-safe stack.Land isengineered withRust andTauri for the native backend (Mountain
) andTypeScript withEffect-TS for all application logic (Wind
andCocoon
).
Our vision is to deliver a lightning-fast and deeply reliable editing experienceby leveraging declarative, effects-based programming across the entireapplication. This architecture ensures that all side effects—from filesystemoperations to UI updates and network requests—are handled in a structured,testable, and composable way.
- Declarative Effect System: The entire application, from the Rust backendto the TypeScript frontend, is built on an effects-based architecture. We usea custom
ActionEffect
system in Rust andEffect-TS in TypeScript. Thisprovides compile-time guarantees for error handling, resource management, andasynchronicity, leading to exceptional stability. - High-Performance Backend: The
Mountain
backend is written in Rust,providing native speed for all core operations like file I/O, search, andprocess management. - High-Fidelity Extension Host: The
Cocoon
sidecar is a Node.js processdesigned to run existing VS Code extensions with high compatibility. Itprovides a sandboxedvscode
API, built with Effect-TS, that communicateswithMountain
for all native operations. - Modern UI Services: The
Wind
project is a from-scratch, Effect-TS nativere-implementation of the VS Code workbench services, providing a clean,functional, and testable foundation for the UI. - Strongly-Typed IPC: All communication between the
Mountain
backend andtheCocoon
extension host is handled viagRPC, ensuring a robust,performant, and strongly-typed API contract defined in a.proto
file.
Land's architecture is composed of several key components that work inconcert to deliver a modern editing experience.
Component | Role & Key Responsibilities | Primary Technologies |
---|---|---|
Common (Rust) | The Abstract Core Library. Defines the application's "language". It contains all abstracttrait definitions, theActionEffect system, and Data Transfer Objects (DTOs). It has no knowledge of the final implementation. | Rust |
Mountain (Rust) | The Native Backend. A Tauri application thatimplements the traits fromCommon . It manages native OS operations, hosts the gRPC server, manages theCocoon process, and communicates with theWind UI via Tauri events. | Rust, Tauri, Tokio,tonic (gRPC) |
Cocoon (TypeScript) | The Extension Host. A Node.js process that provides a high-fidelityvscode API to extensions. It's built entirely with Effect-TS and communicates withMountain via gRPC for all privileged operations. | TypeScript, Node.js, Effect-TS, gRPC |
Wind &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 byWind .Wind communicates withMountain via Tauri events. | TypeScript, Effect-TS |
To understand how these components interact, please refer to the detailedworkflow descriptions indocs/Workflow.md
.The following provides a table of contents for these essential processes.
Application Startup & Handshake
- Describes the complete end-to-end process of launching
Mountain
,spawningCocoon
, and establishing a stable, initialized state for boththe UI and the extension host.
- Describes the complete end-to-end process of launching
Opening a File from the UI
- Details the flow from a user clicking a file in the explorer to thecontent being read from disk by
Mountain
and rendered in an editor byWind
.
- Details the flow from a user clicking a file in the explorer to thecontent being read from disk by
Invoking a Language Feature (Hover Provider)
- A key example of bi-directional communication, showing how an extensionin
Cocoon
registers a feature,Mountain
orchestrates the request, andthe result is displayed in theWind
UI.
- A key example of bi-directional communication, showing how an extensionin
Saving a File with Save Participants
- Explains the advanced process of intercepting a save event, allowing anextension in
Cocoon
to modify a file (e.g., for formatting) beforeMountain
writes it to disk.
- Explains the advanced process of intercepting a save event, allowing anextension in
Executing a Command from the Command Palette
- Illustrates the unified command system, showing how
Mountain
's commandregistry can seamlessly dispatch execution to either a native Rust handleror a proxied command inCocoon
.
- Illustrates the unified command system, showing how
Creating and Interacting with a Webview Panel
- Details the full lifecycle of extension-contributed UI, from
Cocoon
requesting a panel toMountain
managing the native webview window andproxying messages back and forth.
- Details the full lifecycle of extension-contributed UI, from
Creating and Interacting with an Integrated Terminal
- A deep dive into native process management, showing how
Mountain
spawnsa PTY process and streams its I/O to both theWind
frontend and theCocoon
extension host.
- A deep dive into native process management, showing how
Source Control Management (SCM)
- Outlines how the built-in Git extension in
Cocoon
usesMountain
as aservice to run nativegit
commands and then populates the SCM view inthe UI with the results.
- Outlines how the built-in Git extension in
User Data Synchronization
- Describes the end-to-end process of syncing user settings. It covers userauthentication, fetching data from a remote store, performing a three-waymerge, applying changes locally, and notifying all parts of theapplication.
Running Extension Tests
- Explains the "Extension Development Host" model, where a second, isolatedinstance of the application is launched to run tests, with the test
Cocoon
instance remote-controlling the main UI.
- Explains the "Extension Development Host" model, where a second, isolatedinstance of the application is launched to run tests, with the test
The following workflows are implemented in the codebase but are pending detaileddocumentation.
- Tree View Data Flow
- Custom Editor Lifecycle
- Debugging Session Lifecycle
- Task Execution
WhileCocoon
provides high compatibility with the existing VS Code ecosystem,our long-term vision includesGrove
, a native Rust extension host.Grove
aims to provide a highly optimized, secure, and performant environment forextensions written in Rust or compiled to WASM, drastically reducing theoverhead of a Node.js runtime and enabling deeper integration withMountain
.
Our codebase is organized into "Elements", each representing a distinctcomponent or library with a clear purpose. Most Elements are managed as Gitsubmodules within the mainLand repository, allowing for independentdevelopment and versioning.
Path | Component / Purpose | |
---|---|---|
Land/Element/Common | The Abstract Core Library (Rust). This is the architectural heart of the native backend. It contains no concrete logic, onlytrait definitions, theActionEffect 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 withinMountain . | |
Land/Element/River | Filesystem Read Library (Rust). A native Rust library providing efficient, asynchronous filesystemread operations. It is used byMountain 's handlers to implement theFsReader trait fromCommon . | |
Land/Element/Sun | Filesystem Write Library (Rust). A native Rust library providing efficient, asynchronous filesystemwrite operations. It is used byMountain 's handlers to implement theFsWriter trait fromCommon . | |
Land/Element/Vine | The gRPC Protocol & Implementation. This element contains the.proto file defining the gRPC contract betweenMountain andCocoon . It also includes the generated code and the concrete Rust server/client implementations within theMountain andCocoon projects. | |
Land/Element/Mountain | The Native Backend Application (Rust). This is the main Tauri application. Itimplements the traits fromCommon , manages the application window, orchestrates native OS operations, hosts the gRPC server, and manages the lifecycle of all sidecar processes. | |
Land/Element/Dependency/Microsoft/Dependency/Editor | The VS Code Source Submodule. Contains a specific version of the Microsoft VS Code source code. This is a critical dependency used byRest to buildCocoon 's runtime and byWind 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., foresbuild ) used to bundle the necessary VS Code platform code from theDependency submodule forCocoon to consume. | |
Land/Element/Output | The Bundled JS Output. This directory is the destination for the bundled JavaScript artifacts created by theRest build process. It is the code thatCocoon 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 withEffect-TS and provides a high-fidelityvscode API, proxying privileged calls toMountain 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 theWind /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 theWind service layer. | |
Land/Element/Mist | WebSocket Communication Logic. This component handles WebSocket communication. It can be implemented either as a native module withinMountain or as a separate sidecar. | |
Land/Element/Maintain | Project Maintenance & 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. |
This diagram illustrates the build-time and runtime interactions between theprimary components of the Land application.
graph LR classDef mountain fill:#f9f,stroke:#333,stroke-width:2px; classDef cocoon fill:#ccf,stroke:#333,stroke-width:2px; classDef wind fill:#9cf,stroke:#333,stroke-width:2px; classDef common fill:#cfc,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5; classDef ipc fill:#ff9,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5; classDef build fill:#ddd,stroke:#666; classDef data fill:#eee,stroke:#666; subgraph "Build Time Process" direction LR VSCodeSource["VS Code Source (Dependency/Editor)"]:::build RestBuild["JS Bundler (Rest Element)"]:::build CocoonBundleJS(Cocoon Runtime JS):::data SkyBuildProcess["Sky Build (Sky Element)"]:::build SkyAssets(Sky Frontend Assets):::data VSCodeSource --> RestBuild; VSCodeSource -- Uses UI code --> SkyBuildProcess; RestBuild --> CocoonBundleJS; SkyBuildProcess --> SkyAssets; end subgraph "Runtime: **Land** Application" subgraph "Native Backend (Rust)" Mountain["**Mountain (Tauri App)**"]:::mountain CommonCrate[**Common Crate**]:::common TrackDispatcher[Track Dispatcher]:::mountain VineGRPCServer[Vine gRPC Server]:::mountain NativeHandlers["Native Logic Handlers"]:::mountain ProcessMgmt["Process Management"]:::mountain Mountain -- Uses --> TrackDispatcher TrackDispatcher -- Routes to --> NativeHandlers Mountain -- Implements traits from --> CommonCrate Mountain -- Contains --> VineGRPCServer Mountain -- Contains --> ProcessMgmt end subgraph "UI Frontend (Tauri Webview)" WindServices["**Wind (Effect-TS Services)**"]:::wind SkyUI["**Sky (UI Components)**"]:::wind WindServices -- Drives state of --> SkyUI end subgraph "Extension Host (Node.js Sidecar)" Cocoon[**Cocoon Process**]:::cocoon VineGRPCClient[Vine gRPC Client]:::cocoon VSCodeAPI[vscode API Shim]:::cocoon Extension["Extension Code"]:::cocoon Cocoon -- Contains --> VineGRPCClient Cocoon -- Provides --> VSCodeAPI VSCodeAPI -- Used by --> Extension end ProcessMgmt -- Spawns & Manages --> Cocoon WindServices -- Tauri IPC (Commands & Events) --> TrackDispatcher VineGRPCClient -- gRPC (Vine Protocol) <--> VineGRPCServer; class VineGRPCClient,VineGRPCServer ipc; end CocoonBundleJS -- Loaded by --> Cocoon; SkyAssets -- Loaded by --> WindServices;
Follow these steps to getLand up and running on your system.
This command downloads theLand project files. The--recurse-submodules
flag is crucial as it fetches all "Element" submodules and the VS Code sourcecode dependency.
git clone ssh://git@github.com/CodeEditorLand/Land.git --recurse-submodules
This command usespnpm
(aNode.js package manager) to install allJavaScript dependencies required for building theSky
frontend, theCocoon
sidecar, and various development tools.
pnpm install
The build process is multi-stage. It uses a set of environment variables tocontrol the output, allowing you to create either an optimized production buildor a flexible development build.
Build Variables Explained:
These variables are passed to our build scripts to configure their behavior:
Variable | Purpose |
---|---|
NODE_VERSION | Sets theNode.js version for theSideCar picked from -https://github.com/CodeEditorLand/SideCar to be included in the final build inMountain . |
NODE_ENV | Sets the build mode.development includes source maps and skips minification for easier debugging.production creates smaller, optimized files for release. |
Clean | Iftrue , the build script will first delete theLand/Element/Output directory to ensure a completely fresh build without any old artifacts. |
Browser | Iftrue , configures the TypeScript and bundler settings to produce code compatible with a browser environment, which is necessary forWind /Sky running in Tauri's webview. |
Dependency | Specifies the source directory for the VS Code platform code. This should always be set toMicrosoft/VSCode to point to the submodule atLand/Dependency/Microsoft/Dependency/Editor . |
Bundle | (Important) Iftrue , this triggers theSky build element to bundle the required VS Code platform JavaScript into a format that theCocoon (Node.js) sidecar can load and use. This is essential for Path A. |
Compile | Iftrue , this bundles the code into single, self-contained files. This is typically used for production builds to reduce the number of network requests and simplify deployment. Whenfalse (fortauri dev ), it allows for faster, incremental builds and hot-reloading. |
NODE_OPTIONS | Used to increase the default memory limit for Node.js. The bundling process, especially for the entire VS Code platform, can be memory-intensive. |
Development Build:
This command creates a full development build of the application. The output isnot as optimized as a release build but is ideal for debugging.
pnpm cross-env \NODE_ENV=development \NODE_VERSION=22 \Clean=true \Browser=true \Dependency=Microsoft/VSCode \Bundle=false \Compile=false \NODE_OPTIONS=--max-old-space-size=16384 \pnpm tauri build
Production Build (Release):
This command creates a fully optimized, minified, and production-ready versionofLand, suitable for packaging and distribution.
pnpm cross-env \NODE_ENV=production \NODE_VERSION=22 \Clean=true \Browser=true \Dependency=Microsoft/VSCode \Bundle=true \Compile=true \NODE_OPTIONS=--max-old-space-size=16384 \pnpm tauri build --release
This is the primary command you will use during active development. It startsLand with hot-reloading enabled for the frontend, allowing UI changes to beseen instantly without a full application rebuild.
Notice thatBundle
andCompile
are set tofalse
. This is becausetauri dev
uses Vite (or a similar dev server) which handles module bundlingon-the-fly, providing a much faster development experience.
pnpm cross-env \NODE_ENV=development \Clean=true \Browser=true \Dependency=Microsoft/VSCode \Bundle=false \Compile=false \NODE_OPTIONS=--max-old-space-size=16384 \pnpm tauri dev
This project is released into the public domain under theCreative Commons CC0Universal license. You are free to use, modify, distribute, and build uponthis work for any purpose, without any restrictions. For the full legal text,see theLICENSE
file.
Stay updated with our progress! SeeCHANGELOG.md
for a history of changes.
Land 🏞️ is proud to be an open-source endeavor. Our journey is significantlysupported by the organizations and projects that believe in the future ofopen-source software.
This project is funded throughNGI0 Commons Fund, a fund established byNLnet with financial support from the European Commission'sNext Generation Internet program. Learn more at theNLnet project page.
Land | PlayForm | NLnet | NGI0 Commons Fund |
---|---|---|---|
This project would not be possible without the incredible work of theopen-source community. We are especially grateful for the following foundationaltechnologies and projects:
- Tauri: For providing a secure, performant, andresource-efficient framework for building our native desktop application witha web frontend.
- Microsoft Visual Studio Code: Foropen-sourcing their workbench UI and platform code, which provides thefoundation for our user interface and extension host compatibility.
- Effect-TS: For enabling us to build arobust, type-safe, and declarative application with a powerful structuredconcurrency and dependency management system in TypeScript.
- Rust: For the performance, safety, andmodern tooling that powers our entire native backend.
- Tokio &Tonic: For providing the asynchronousruntime and gRPC framework that are the backbone of our high-performance IPC.
- Astro: For its content-driven approach that allowsus to build a fast and modern user interface for the
Sky
component. - PNPM: For efficient and reliable management of ourJavaScript dependencies.
- and many many more...
We extend our sincere gratitude to the maintainers and contributors of these andall the other dependencies we use. ❤️
Project Maintainers: Source Open(Source/Open@Editor.Land) |GitHub Repository |Report an Issue |Security Policy
PinnedLoading
Repositories
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyTauriCargo’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Rest’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/SideCar’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Asset’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Wind’s past year of commit activity - DependencyVercelNPM Public
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyVercelNPM’s past year of commit activity
Top languages
Loading…
Uh oh!
There was an error while loading.Please reload this page.
Most used topics
Loading…
Uh oh!
There was an error while loading.Please reload this page.