Land 🏞️
Verified
We've verified that the organizationCodeEditorLand controls the domain:
- editor.land
Dependency 🖇️ | Cargo 📦 Land 🏞️ | ||
Dependency 🖇️ Land 🏞️ | NPM 📦 Land 🏞️ | ||
Echo 📣 | Land 🏞️ | ||
Editor 🏞️ | Element 🌱 | ||
Mountain ⛰️ | River 🌊 | ||
Sky 🌌 | Sun ☀️ | ||
Wind 🌬️ |
Welcome toLand! We are building a high-performance, resource-efficient, andcross-platform code editor inspired by the best of VS Code.Land isengineered with a modern stack –Rust for the backend (Mountain
) andTauri for the native shell – to deliver a lightning-fast, memory-conscious,and deeply familiar editing experience for developers.
Our vision is to create a truly adaptable editor. It will not only match VSCode's core functionality but also offer a flexible foundation for runningextensions in various environments. This approach optimizes for performance,security, and specific use cases, giving developers the power and flexibilitythey need.
The Minimum Viable Product (MVP) aims to deliver a foundational yet functionaleditor demonstratingLand's core architecture and capabilities. Keydeliverables include:
- Core Editor Functionality:
- A runnable
Land
application where theSky
frontend (UI) communicateswith theMountain
backend (Rust) via theEcho
interface andTrack
dispatcher.
- A runnable
- File System Operations:
- Users will be able to browse directories, and open, edit, and save textfiles. This is powered by the
Native Logic Flow
inMountain
, utilizingtheRiver
(read) andSun
(write) libraries.
- Users will be able to browse directories, and open, edit, and save textfiles. This is powered by the
- WebSocket Communication:
- Essential real-time communication pathways will be functional, handled bythe
Mist
component (either native inMountain
or as a sidecar).
- Essential real-time communication pathways will be functional, handled bythe
- OS Protocol Handling:
- The application will handleOS-level
vscode:/
protocol invocations,allowingLand to be opened from external links or tools.
- The application will handleOS-level
- Basic Extension Support:
- A foundational
Extension Host
will be implemented (eitherCocoon
forNode.js extensions or an initialGrove
for nativeRust/WASMextensions). This will allow a limited subset of simpler extensions toload and operate, demonstrating the chosen pathway.
- A foundational
- Custom
Runner
Integration:- A custom auxiliary process (named
Runner
) will be reliably managed byMountain
for specific background tasks.
- A custom auxiliary process (named
- Basic Build System:
- A functional build process will compile all components and package arunnableTauri application for development and testing.
What this means for users at MVP: You'll be able to install and runLand, open and edit files, and see the groundwork for future extensionsupport and advanced features. The focus is on validating the core architectureand providing a stable base for future development.
Land's development is a phased journey towards its full vision:
- MVP Path A (Current Focus -
Cocoon
Sidecar): Establish a functionalcore editor with aNode.js sidecar (Cocoon
). This approach allows usto leverage the vast VS Code extension ecosystem quickly by running existingextensions, whileMountain
andSky
benefit fromTauri's nativeperformance. - MVP Path B (Future Goal -
Grove
Native Host): Develop aRust-native extension host (Grove
). This aims to provide a highlyoptimized, secure, and performant environment for extensions, potentiallyenabling extensions written inRust or compiled toWASM. - Exploring Alternative Runtimes (Future Research): Investigate andpotentially support other lightweightJavaScript runtimes (e.g.,Deno,LLRT) as specialized extension sidecars where their uniquebenefits like security or startup speed are paramount.
This README primarily details the currentMVP Path A architecture and goals,with an eye towards these future evolutions.
No matter the extension host flavor,Land's core architecture (Mountain
,Sky
,Echo
,Track
,Vine
,River
,Sun
,Mist
,Runner
) is designedfor modularity and performance:
Component | Role & Key Responsibilities | Primary Technologies |
---|---|---|
Mountain | The nativeRust/Tauri backend. Manages the app lifecycle,OS operations, UI windows (viaTauri), theTrack command dispatcher,Vine IPC, and lifecycle of sidecars (Cocoon ) and auxiliary processes (Runner ). | Rust,Tauri |
Sky | The user interface, built withAstro (or similar web tech), running inTauri's native webview. Reuses VS Code UI components for a familiar experience. Interacts withMountain via theEcho API contract. | Astro,JS/TS,HTML/CSS |
Echo | TheAction System Interface Definition. It's theAPI contract defining actions and data structures forSky <->Mountain communication. | Rust |
Track | Mountain 's centralCommand Dispatcher. It routesEcho actions fromSky and RPC requests from sidecars to the appropriateRust handlers inMountain . | Rust |
Vine | The primaryIPC Transport Layer (stdioJSON) forMountain to communicate withany sidecar-based extension host (Cocoon , potentialMist sidecar,Deno/LLRT sidecars, or a process-isolatedGrove ). | Rust (Mountain ),JS (Sidecar) |
River /Sun | NativeRust libraries (River for reads,Sun for writes) providing efficient, asynchronous filesystem operations, used byMountain 'sNative Logic Flow handlers. | Rust |
Mist | HandlesWebSocket communication logic. This might be native inMountain or a separate sidecar communicating viaVine . | Rust /JS (if sidecar) |
Runner | A generic auxiliary process managed byMountain . Used for executing specific background tasks or tools that benefit from process isolation. | Varies (e.g., Shell,Node.js) |
Our immediate goal is to deliver a functionalLand editor by runningexisting VS Code extensions withinCocoon
, a dedicatedNode.js sidecarprocess. This allows us to tap into the rich ecosystem of VS Code extensionsearly on.
Cocoon
Architecture (Path A):
Component within Path A | Role |
---|---|
Cocoon Process | ANode.js process launched byMountain . It hosts VS Code'sExtHostExtensionService using pre-bundled platform code. This is where extensions actually run. |
Shims (inCocoon ) | JavaScript modules withinCocoon that mimic VS Code's internalExtHost* services. They interceptAPI calls from extensions and proxy them toMountain viaVine IPC for native execution or UI updates. |
Rest (JS Bundler) | A build-time process (e.g.,esbuild /webpack ) that bundles necessary VS Code platformJavaScript (from the VS Code source submodule, typically atLand/Dependency/Microsoft/Dependency/Editor ) into a formatCocoon can load. |
How it Works (Simplified for Path A):
Mountain
(the mainRust application) launches theCocoon
Node.jssidecar.Cocoon
initializes, loading the bundled VS Code platform code and theExtHostExtensionService
.- An extension in
Cocoon
calls avscode.*
API (e.g.,vscode.workspace.fs.readFile
). - A
Shim
inCocoon
intercepts this call. - The
Shim
sends a request viaVine
(JSON over stdio) toMountain
. Mountain
'sTrack
dispatcher routes this request to the appropriateRust handler (e.g., usingRiver
to read the file).Mountain
sends the result back toCocoon
viaVine
.- The
Shim
returns the result to the extension, completing theAPI call.
This approach aims for high compatibility with existingNode.js-based VSCode extensions by providing them with a familiar environment andAPIsurface.
WhileCocoon
(Node.js sidecar) is our Path A for MVP,Land is designedwith future flexibility in mind to achieve greater performance, security, andpotentially support different classes of extensions.
Path B:Grove
- The Native Rust Extension Host 🌳
Concept: A complete rewrite of the VS Code extension host logic inRust.Grove
aims to run extensions (potentially those recompiled toWASM or newextensions written inRust/WASM) in a highly performant and securenative environment.
Goal: Drastically reduce the overhead of aNode.js runtime, improvesecurity throughRust's safety andWASM sandboxing, and enable deeperintegration withMountain
.
Status: A longer-term vision. This involves reimplementing the entirevscode.*
API surface inRust.
Alternative Runtimes (Conceptual Exploration) 🧪
Deno Sidecar: ExploreDeno for its security model andTypeScript-first approach.
LLRT Sidecar: InvestigateLLRT for ultra-lightweight, fast-startupextensions.
Achieving Feature Parity: Our long-term ambition is to achieve a high degreeof feature parity with VS Code. This will be an iterative process:
- Core Editing & MVP Extensions (Path A): Ensuring basic text editing,file management (
River
/Sun
), and core extensionAPIs functionreliably viaCocoon
. - Expanding API Coverage (Path A/B): Incrementally implementing more
Shims
(Path A) or nativeAPI implementations (Path B -Grove
) tosupport a wider range of extensions. - Native Feature Implementation: Re-implementing complex VS Code features(Debugging, SCM, Tasks, Rich UI Panels) natively in
Mountain
andSky
. - Performance & Stability: Continuously optimizing all components.
(Tracking feature parity is a manual process involving extensive testing andcomparison against VS Code.)
Our codebase is organized into "Elements," each with a distinct purpose. ManyElements that link to separate repositories are managed as Git submodules withinthe mainLand repository.
Path | Component / Purpose |
---|---|
Land/Element/Cocoon | Node.js sidecar for Path A (index.js ,Shims ,cocoon-ipc.js ). (Submodule) |
Land/Element/Echo | Rust crate defining theEcho API contract (command names, shared data structures) betweenSky andMountain . (Submodule) |
Land/Element/Grove | (Future - Path B) PlannedRust-basedWASM/Native extension runtime. (Submodule) |
Land/Element/Mist | Component forWebSocket communication logic (native or sidecar). (Submodule) |
Land/Element/Mountain | The coreRust/Tauri backend application (Track dispatcher,Vine IPC, native handlers). (Submodule) |
Land/Element/Output | Our TypeScript build of VS Code's original source code. (Submodule) |
Land/Element/Rest | Scripts and configuration for theJS Bundler (bundling VS Code platform code forCocoon ). (Submodule) |
Land/Element/River | Rust library for native filesystemread operations. (Submodule) |
Land/Element/Shim | TypeScript definitions (vscode.ts ) for the VS CodeAPI surface targeted byCocoon Shims . (Submodule) |
Land/Element/Sky | Astro-based frontend UI application. (Submodule) |
Land/Element/Sun | Rust library for native filesystemwrite operations. (Submodule) |
Land/Element/Maintain | Build scripts (GritQL queries here), CI/CD configuration, development utilities. (Submodule) |
Land/Element/Wind | (Conceptual) Potentially a UI component library or design system forSky . (Submodule) |
Land/Element/Worker | (Conceptual) For web worker implementations used bySky . (Submodule) |
Land/Dependency/Microsoft/Dependency/Editor | Contains a copy of the VSCode source code (Git submodule). This is used byRest (forCocoon ) andGritQL (for analysis/refactoring). |
Follow these steps to getLand up and running on your system.
Clone the Repository:
This command downloads theLand project files. The
--recurse-submodules
flag is crucial as it fetches all "Element"submodules and the VS Code source code dependency.git clone ssh://git@github.com/CodeEditorLand/Land.git --recurse-submodules
Install Dependencies:
This command uses
pnpm
(aNode.js package manager) to install allJavaScript dependencies required for building theSky
frontend, theCocoon
sidecar, and various development tools.pnpm install
Build the Application:
The build process is multi-stage: it prepares VS Code dependencies (using
Rest
), bundlesJavaScript forCocoon
, compiles theRust backend(Mountain
and otherRust Elements), and finally builds theTauriapplication.
Build Variables Explained:
These variables control aspects of the build:
Variable | Purpose |
---|---|
Browser=true | InfluencesJS build targets, ensuring web compatibility forSky running inTauri's webview. |
Bundle=true | Crucial for Path A! TriggersRest to bundle VS Code platformJS required forCocoon . |
Clean=true | Clears previous build artifacts fromLand/Element/Output for a completely fresh build. |
Dependency=Microsoft/VSCode | Specifies the VS Code source to use forCocoon 'sJS bundle. This typically refers to the submodule atLand/Dependency/Microsoft/Dependency/Editor . |
NODE_ENV=development orproduction | Controls build optimizations (minification, debug info).production is smaller and faster. |
NODE_OPTIONS=--max-old-space-size=16384 | IncreasesNode.js memory limit, often needed for the resource-intensiveRest bundling step. |
Development Build:
This command creates a development version ofLand, which usually includesmore debugging information and might build faster by skipping someoptimizations.
pnpm cross-env \Browser=true \Bundle=true \Clean=true \Dependency=Microsoft/VSCode \NODE_ENV=development \NODE_OPTIONS=--max-old-space-size=16384 \pnpm tauri build
Production Build (Release):
This command creates an optimized release version ofLand, suitable fordistribution.
pnpm cross-env \Browser=true \Bundle=true \Clean=true \Dependency=Microsoft/VSCode \NODE_ENV=production \NODE_OPTIONS=--max-old-space-size=16384 \pnpm tauri build --release
4. Run Land:
Development Mode:
This command startsLand in development mode. It typically enableshot-reloading for theSky
frontend, allowing UI changes to be seen quicklywithout a full rebuild. This is the recommended way to runLand duringactive development.
pnpm run tauri dev
Production Build:
After a production build, the executable will be located inLand/Element/Mountain/target/release
(or abundle
subdirectory, depending onyourOS andTauri configuration). Run this executable to start theoptimized version ofLand.
When you runLand:
Mountain
(theTauri app /Rust backend) starts up.- ForPath A (MVP),
Mountain
automatically launches theCocoon
Node.js sidecar process. - The
Sky
UI loads in theTauri webview, presenting the editorinterface. - The MVP aims to demonstrate core functionality, such as opening files andloading a basic "Hello World" type extension via
Cocoon
, proving theTrack
/Echo
/Vine
communication pathways are working.
(Refer to the detailed Mermaid diagram below or inARCHITECTURE.md
for adeeper dive into component interactions!)
This diagram illustrates the build-time and runtime components for the MVPfocused on Path A (Cocoon
sidecar).
graph TD %% Styling classDef mountain fill:#f9f,stroke:#333,stroke-width:2px; classDef cocoon fill:#ccf,stroke:#333,stroke-width:2px; classDef sky fill:#9cf,stroke:#333,stroke-width:2px; 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; classDef lib fill:#cfc,stroke:#333,stroke-width:1px; subgraph "Build Time Process" direction LR VSCodeSource["VS Code Source (Submodule at Land/Dependency/.../Editor)"]:::build RestBuild["JS Bundler (Rest Element)"]:::build CocoonBundleJS(Cocoon JS Bundle):::data SkyBuildProcess["Sky Build (Astro/Vite - 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 "Mountain (**Rust**/**Tauri** Backend - Mountain Element)" TauriRuntime[**Tauri** Runtime]:::mountain; TrackDispatcher[Track Dispatcher]:::mountain; MountainHandlers["Native Handlers (FS: River/Sun, WS: Mist)"]:::mountain; VineRustIPC["Vine (**Rust** IPC Layer)"]:::mountain; ProcessMgmtSystem["Process Management (Cocoon, Auxiliary Runners)"]:::mountain; RiverLib["River Lib"]:::lib; SunLib["Sun Lib"]:::lib; TauriRuntime -- Manages --> TrackDispatcher; TrackDispatcher -- Routes to --> MountainHandlers; MountainHandlers -- Uses --> RiverLib; MountainHandlers -- Uses --> SunLib; ProcessMgmtSystem -- Launches/Pipes --> CocoonSidecar; ProcessMgmtSystem -- Manages --> RunnerProcess["Runner Process(es)"]; ProcessMgmtSystem -- Uses --> VineRustIPC; end subgraph "Sky (Frontend - **Tauri** Webview - Sky Element)" SkyUI["Sky UI (**Astro**/**JS**/**TS**)"]:::sky EchoFrontend["Echo **API** Client (**JS**)"]:::sky end subgraph "Cocoon (**Node.js** Sidecar - Cocoon Element)" NodeJSProcess[**Node.js** Process]:::cocoon; CocoonBootstrap["index.js (Bootstrap)"]:::cocoon; CocoonVineIPC["cocoon-ipc.js (Vine **JS** Layer)"]:::cocoon; CocoonShims[Shims/*.js]:::cocoon; BundledVSCodeJS["Loaded VSCode Platform **JS** (from Rest)"]:::cocoon; ExtHostServiceJS[ExtHostExtensionService]:::cocoon; ExtensionCode[Extension Code]:::cocoon; NodeJSProcess -- Runs --> CocoonBootstrap; CocoonBootstrap -- Loads --> BundledVSCodeJS; CocoonBootstrap -- Initializes --> CocoonShims; CocoonBootstrap -- Initializes --> CocoonVineIPC; CocoonBootstrap -- Initializes --> ExtHostServiceJS; ExtHostServiceJS -- Uses --> CocoonShims; ExtHostServiceJS -- Activates --> ExtensionCode; CocoonShims -- Uses --> CocoonVineIPC; end SkyUI -- Uses --> EchoFrontend; EchoFrontend -- **Tauri** `invoke` (Echo Action) --> TrackDispatcher; VineRustIPC -- Vine Protocol (**JSON**/stdio) <--> CocoonVineIPC; class VineRustIPC,CocoonVineIPC ipc; MountainHandlers -- Can send RPC via Vine --> CocoonVineIPC; %% Extension making an **API** call implies CocoonShim intercepts and sends it out via Vine end CocoonBundleJS -- Packaged with --> CocoonSidecar; SkyAssets -- Packaged into --> Mountain;
Stay updated with our progress! SeeCHANGELOG.md
for a historyof changes.
Land is proud to be an open-source endeavor. Our journey is significantlysupported by:
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 |
---|---|---|---|
PinnedLoading
Repositories
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Worker’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Mountain’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Land’s past year of commit activity - DependencySWC Public
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencySWC’s past year of commit activity - DependencyRolldown Public
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyRolldown’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyMicrosoft’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Dependency’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/Element’s past year of commit activity - DependencyVercel Public
Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyVercel’s past year of commit activity Uh oh!
There was an error while loading.Please reload this page.
CodeEditorLand/DependencyTauri’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.