Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings
CodeEditorLand

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
@CodeEditorLand

Land 🏞️

Editor 🏞️

FOSSA Status

Land

Update
Issue
Star
Download
Dependency 🖇️
Update
Issue
Star
Download
Cargo 📦 Land 🏞️
Update
Issue
Star
Download
Dependency 🖇️ Land 🏞️
Update
Issue
Star
Download
NPM 📦 Land 🏞️
Update
Issue
Star
Download
Echo 📣
Update
Issue
Star
Download
Land 🏞️
Update
Issue
Star
Download
Editor 🏞️
Update
Issue
Star
Download
Element 🌱
Update
Issue
Star
Download
Mountain ⛰️
Update
Issue
Star
Download
River 🌊
Update
Issue
Star
Download
Sky 🌌
Update
Issue
Star
Download
Sun ☀️
Update
Issue
Star
Download
Wind 🌬️
FOSSA Status

Land 🏞️ The Next-Generation Code Editor

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.

Key Features (MVP Focus)

The Minimum Viable Product (MVP) aims to deliver a foundational yet functionaleditor demonstratingLand's core architecture and capabilities. Keydeliverables include:

  1. Core Editor Functionality:
    • A runnableLand application where theSky frontend (UI) communicateswith theMountain backend (Rust) via theEcho interface andTrack dispatcher.
  2. File System Operations:
    • Users will be able to browse directories, and open, edit, and save textfiles. This is powered by theNative Logic Flow inMountain, utilizingtheRiver (read) andSun (write) libraries.
  3. WebSocket Communication:
    • Essential real-time communication pathways will be functional, handled bytheMist component (either native inMountain or as a sidecar).
  4. OS Protocol Handling:
    • The application will handleOS-levelvscode:/ protocol invocations,allowingLand to be opened from external links or tools.
  5. Basic Extension Support:
    • A foundationalExtension 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.
  6. CustomRunner Integration:
    • A custom auxiliary process (namedRunner) will be reliably managed byMountain for specific background tasks.
  7. 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.

Our Journey: Phased Evolution 🗺️

Land's development is a phased journey towards its full vision:

  1. 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.
  2. 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.
  3. 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.


Core Architecture Principles 🏗️

No matter the extension host flavor,Land's core architecture (Mountain,Sky,Echo,Track,Vine,River,Sun,Mist,Runner) is designedfor modularity and performance:

ComponentRole & Key ResponsibilitiesPrimary Technologies
MountainThe nativeRust/Tauri backend. Manages the app lifecycle,OS operations, UI windows (viaTauri), theTrack command dispatcher,VineIPC, and lifecycle of sidecars (Cocoon) and auxiliary processes (Runner).Rust,Tauri
SkyThe 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 theEchoAPI contract.Astro,JS/TS,HTML/CSS
EchoTheAction System Interface Definition. It's theAPI contract defining actions and data structures forSky <->Mountain communication.Rust
TrackMountain's centralCommand Dispatcher. It routesEcho actions fromSky and RPC requests from sidecars to the appropriateRust handlers inMountain.Rust
VineThe 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/SunNativeRust libraries (River for reads,Sun for writes) providing efficient, asynchronous filesystem operations, used byMountain'sNative Logic Flow handlers.Rust
MistHandlesWebSocket communication logic. This might be native inMountain or a separate sidecar communicating viaVine.Rust /JS (if sidecar)
RunnerA generic auxiliary process managed byMountain. Used for executing specific background tasks or tools that benefit from process isolation.Varies (e.g., Shell,Node.js)

Current Focus: MVP Path A - TheCocoon (Node.js Sidecar) 🦋

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 ARole
Cocoon ProcessANode.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 viaVineIPC 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):

  1. Mountain (the mainRust application) launches theCocoonNode.jssidecar.
  2. Cocoon initializes, loading the bundled VS Code platform code and theExtHostExtensionService.
  3. An extension inCocoon calls avscode.*API (e.g.,vscode.workspace.fs.readFile).
  4. AShim inCocoon intercepts this call.
  5. TheShim sends a request viaVine (JSON over stdio) toMountain.
  6. Mountain'sTrack dispatcher routes this request to the appropriateRust handler (e.g., usingRiver to read the file).
  7. Mountain sends the result back toCocoon viaVine.
  8. TheShim 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.


Future Extension Host Paths & Feature Parity 🚀

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:

  1. Core Editing & MVP Extensions (Path A): Ensuring basic text editing,file management (River/Sun), and core extensionAPIs functionreliably viaCocoon.
  2. Expanding API Coverage (Path A/B): Incrementally implementing moreShims (Path A) or nativeAPI implementations (Path B -Grove) tosupport a wider range of extensions.
  3. Native Feature Implementation: Re-implementing complex VS Code features(Debugging, SCM, Tasks, Rich UI Panels) natively inMountain andSky.
  4. Performance & Stability: Continuously optimizing all components.

(Tracking feature parity is a manual process involving extensive testing andcomparison against VS Code.)


Project Structure Overview (Land/Element/*) 🗺️

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.

PathComponent / Purpose
Land/Element/CocoonNode.js sidecar for Path A (index.js,Shims,cocoon-ipc.js). (Submodule)
Land/Element/EchoRust crate defining theEchoAPI contract (command names, shared data structures) betweenSky andMountain. (Submodule)
Land/Element/Grove(Future - Path B) PlannedRust-basedWASM/Native extension runtime. (Submodule)
Land/Element/MistComponent forWebSocket communication logic (native or sidecar). (Submodule)
Land/Element/MountainThe coreRust/Tauri backend application (Track dispatcher,VineIPC, native handlers). (Submodule)
Land/Element/OutputOur TypeScript build of VS Code's original source code. (Submodule)
Land/Element/RestScripts and configuration for theJS Bundler (bundling VS Code platform code forCocoon). (Submodule)
Land/Element/RiverRust library for native filesystemread operations. (Submodule)
Land/Element/ShimTypeScript definitions (vscode.ts) for the VS CodeAPI surface targeted byCocoonShims. (Submodule)
Land/Element/SkyAstro-based frontend UI application. (Submodule)
Land/Element/SunRust library for native filesystemwrite operations. (Submodule)
Land/Element/MaintainBuild 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/EditorContains a copy of the VSCode source code (Git submodule). This is used byRest (forCocoon) andGritQL (for analysis/refactoring).

Getting Started 🚀

Follow these steps to getLand up and running on your system.

  1. 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
  2. Install Dependencies:

    This command usespnpm (aNode.js package manager) to install allJavaScript dependencies required for building theSky frontend, theCocoon sidecar, and various development tools.

    pnpm install
  3. Build the Application:

    The build process is multi-stage: it prepares VS Code dependencies (usingRest), bundlesJavaScript forCocoon, compiles theRust backend(Mountain and otherRust Elements), and finally builds theTauriapplication.

Build Variables Explained:

These variables control aspects of the build:

VariablePurpose
Browser=trueInfluencesJS build targets, ensuring web compatibility forSky running inTauri's webview.
Bundle=trueCrucial for Path A! TriggersRest to bundle VS Code platformJS required forCocoon.
Clean=trueClears previous build artifacts fromLand/Element/Output for a completely fresh build.
Dependency=Microsoft/VSCodeSpecifies the VS Code source to use forCocoon'sJS bundle. This typically refers to the submodule atLand/Dependency/Microsoft/Dependency/Editor.
NODE_ENV=development orproductionControls build optimizations (minification, debug info).production is smaller and faster.
NODE_OPTIONS=--max-old-space-size=16384IncreasesNode.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.


Usage Guide 🛠️

When you runLand:

  1. Mountain (theTauri app /Rust backend) starts up.
  2. ForPath A (MVP),Mountain automatically launches theCocoonNode.js sidecar process.
  3. TheSky UI loads in theTauri webview, presenting the editorinterface.
  4. The MVP aims to demonstrate core functionality, such as opening files andloading a basic "Hello World" type extension viaCocoon, proving theTrack/Echo/Vine communication pathways are working.

Land Conceptual Diagram

(Refer to the detailed Mermaid diagram below or inARCHITECTURE.md for adeeper dive into component interactions!)


System Architecture Diagram (MVP Path A) 🗺️

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;
Loading

Changelog 📜

Stay updated with our progress! SeeCHANGELOG.md for a historyof changes.

Funding & Acknowledgements 🙏

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.

LandPlayFormNLnetNGI0 Commons Fund
LandPlayFormNLnetNGI0 Commons Fund

PinnedLoading

  1. DependencyDependencyPublic

    Dependency 🖇️

    Shell 66 1

  2. EditorEditorPublic

    Forked frommicrosoft/vscode

    Editor 🏞️

    TypeScript 20

  3. DependencyMicrosoftDependencyMicrosoftPublic

    Microsoft 🪟 Dependency 🖇️

    1

  4. DependencyTauriDependencyTauriPublic

    Tauri 🤩 Dependency 🖇️

    1

  5. DependencyOXCDependencyOXCPublic

    OXC ⚓ Dependency 🖇️

    1

  6. DependencyBiomeDependencyBiomePublic

    Biome 🗻 Dependency 🖇️

    1

Repositories

Loading
Type
Select type
Language
Select language
Sort
Select order
Showing 10 of 595 repositories

Top languages

Loading…

Most used topics

Loading…


[8]ページ先頭

©2009-2025 Movatter.jp