The VS Code Environment & Services Layer for Land โ Effect-TS powered Tauri service layer.
Wind replaces VS Code's Electron IPC bridge โ which forces every panel interaction through untyped JSON serialization โ with typed Tauri commands routed to Rust handlers in Mountain's core. It provides the Effect-TS native service layer that enables Sky (Land's VS Code-based UI) to function within the Tauri shell.
Wind recreates the essential VS Code renderer environment, implements core services through Effect-TS's typed error and dependency injection patterns, and connects the frontend to Mountain's Rust backend through Tauri's invoke and event system. It exposes Tauri's native OS file dialogs through Effect-TS wrappers that surface typed, tagged errors. The Preload.ts script establishes window.vscode and shims ipcRenderer and process so VS Code workbench code communicates through Tauri's invoke system instead of Electron's IPC.
Wind operates through three primary mechanisms:
- Preload Shim โ
Preload.tsshims Electron and Node.js APIs that the VS Code workbench expects, establishing a compatible execution context inside theTauriWebView. - Effect-TS Services โ The
Effect/directory contains service implementations, each organized as atomic modules withTag,Interface,Implementation,Layer, andTypesubdirectories that compose intoTauriLiveLayer,ElectronLiveLayer, andTestLayerstacks. - Mountain RPC โ The
Mountainservice maintains an RPC connection to the Rust backend for configuration, state synchronization, and native operations.
graph LR
classDef sky fill:#cce8ff,stroke:#2980b9,stroke-width:2px,color:#003050;
classDef wind fill:#fffde0,stroke:#f0b429,stroke-width:2px,color:#4a3500;
classDef tauri fill:#ffe0f0,stroke:#c0396a,stroke-width:2px,color:#4a0020;
classDef mountain fill:#f0d0ff,stroke:#9b59b6,stroke-width:2px,color:#2c0050;
classDef effectts fill:#d4f5d4,stroke:#27ae60,stroke-width:1px,color:#0a3a0a;
classDef ipc fill:#fff3c0,stroke:#f39c12,stroke-width:1px,stroke-dasharray:5 5,color:#5a3e00;
subgraph SKY["Sky โ๏ธ - Astro UI (Tauri WebView)"]
SkyApp["Sky Workbench Pages ๐ผ๏ธ"]:::sky
end
subgraph WIND["Wind ๐ฌ๏ธ - VS Code Env + Effect-TS Service Layer (WebView)"]
direction TB
subgraph COMPAT["Compatibility Layer"]
Preload["Preload.ts - window.vscode + ipcRenderer shim"]:::wind
Sandbox["Effect/Sandbox - globals service"]:::wind
end
subgraph EFFECTLAYERS["Effect/ - 40+ Service Modules"]
TauriLayer["Effect/Layers/Tauri.ts - TauriLiveLayer โก"]:::effectts
ElectronLayer["Effect/Layers/Electron.ts"]:::effectts
CoreServices["IPC ยท Mountain ยท MountainSync ยท Bootstrap\nConfiguration ยท Lifecycle ยท Storage ยท Telemetry"]:::effectts
UIServices["Clipboard ยท Commands ยท Editor ยท Terminal\nStatusBar ยท Sidebar ยท ActivityBar ยท Panel\nSearch ยท Notifications ยท QuickInputโฆ"]:::effectts
WorkbenchServices["Workbench* generated bridge services"]:::wind
end
subgraph IPCBRIDGE["Service/TauriMainProcessService.ts"]
TauriSvc["IPC channel router + event bridge ๐ก"]:::ipc
end
Preload --> Sandbox
Preload --> TauriLayer
TauriLayer --> CoreServices
TauriLayer --> UIServices
TauriLayer --> WorkbenchServices
CoreServices --> TauriSvc
end
subgraph BACKEND["Tauri Shell + Mountain โฐ๏ธ - Rust Backend"]
TauriAPI["Tauri JS API / @tauri-apps/api โ๏ธ"]:::tauri
MountainCore["Mountain - WindServiceHandlers ๐ฆ"]:::mountain
end
SkyApp -- imports TauriLiveLayer --> TauriLayer
SkyApp -- consumes services via __CEL_SERVICES__ --> UIServices
TauriSvc -- tauri::invoke --> TauriAPI
TauriAPI -- Rust command handlers --> MountainCore
MountainCore -- sky:// Tauri events --> TauriSvc
TauriSvc -- event bridge --> SkyApp
| Component | Path | Description |
|---|---|---|
| Preload Shim | Source/Preload.ts |
VS Code environment emulation in Tauri WebView โ shims Electron APIs, creates window.vscode |
| IPC Service | Source/Effect/IPC/ |
Inter-process communication via Tauri invoke with typed, tagged errors |
| Mountain RPC | Source/Effect/Mountain/ |
Backend RPC connection service for configuration, state, and native operations |
| Configuration | Source/Effect/Configuration/ |
Workbench configuration with sync and change detection |
| Bootstrap | Source/Effect/Bootstrap/ |
Multi-stage bootstrap orchestration for service initialization |
| Codegen | Source/Codegen/ |
VS Code service code generator โ walks service catalog, emits bridge shapes |
| Layers/Tauri | Source/Effect/Layers/Tauri.ts |
Primary composed layer merging 40+ services into TauriLiveLayer |
| Layers/Electron | Source/Effect/Layers/Electron.ts |
Electron compatibility layer stack |
| Layers/Test | Source/Effect/Layers/Test.ts |
Test/mock layer stack for isolated testing |
Wind/
โโโ Source/
โโโ Preload.ts # VS Code environment emulation in Tauri WebView
โโโ Effect/ # Effect-TS services (atomic structure)
โ โโโ IPC/ # Inter-process communication via Tauri invoke
โ โโโ Sandbox/ # Preload globals and environment service
โ โโโ Configuration/ # Workbench configuration with sync
โ โโโ Telemetry/ # Logging, spans, and metrics (PostHog/OTLP)
โ โโโ Mountain/ # Backend RPC connection service
โ โโโ MountainSync/ # Background configuration sync
โ โโโ Environment/ # System and platform detection
โ โโโ Health/ # Service health checks
โ โโโ Bootstrap/ # Multi-stage bootstrap orchestration
โ โโโ Clipboard/ # System clipboard access
โ โโโ Commands/ # VS Code command registry
โ โโโ Editor/ # Editor service abstraction
โ โโโ ActivityBar/ # Activity bar management
โ โโโ Panel/ # Bottom panel management
โ โโโ Sidebar/ # Sidebar management
โ โโโ StatusBar/ # Status bar management
โ โโโ Decorations/ # Editor decorations service
โ โโโ Extensions/ # Extension management
โ โโโ Files/ # File system operations
โ โโโ History/ # Editor history service
โ โโโ Keybinding/ # Keyboard shortcut binding
โ โโโ Label/ # Label service
โ โโโ Language/ # Language service
โ โโโ Lifecycle/ # Application lifecycle
โ โโโ Model/ # Text model service
โ โโโ Notification/ # Notification service
โ โโโ Output/ # Output panel service
โ โโโ Progress/ # Progress indication
โ โโโ QuickInput/ # Quick input UI
โ โโโ Search/ # Search service
โ โโโ Storage/ # Persistent storage
โ โโโ Terminal/ # Terminal service
โ โโโ TextFile/ # Text file service
โ โโโ TextModelResolver/ # Text model resolver
โ โโโ Themes/ # Theme management
โ โโโ WorkingCopy/ # Working copy service
โ โโโ Workspaces/ # Workspace management
โ โโโ NetworkRestrictions/# Network access restrictions
โ โโโ UserSettings/ # User settings bridge
โ โโโ Vine/ # Notification stream
โ โโโ LandWorkbench/ # Land workbench integration
โ โโโ Generated/ # Auto-generated VS Code service interfaces
โ โโโ Layers/ # Layer compositions (Tauri, Electron, Test)
โโโ Bootstrap/ # Bootstrap type definitions for startup
โโโ Codegen/ # VS Code service code generator
โโโ Configuration/ # ESBuild and TypeScript configurations
โโโ FileSystem/ # VS Code-like file system provider
โโโ Function/ # Preload install helpers and IPC renderer creation
โโโ IPC/ # IPC channel and Sky event definitions
โโโ Service/ # Tauri main process service
โโโ Telemetry/ # PostHog telemetry bridge
โโโ Types/ # Sandbox, IPC, and error type definitions
โโโ Utility/ # Shared utility functions
โโโ Workbench/ # Workbench integration service
| Principle | Description | Key Components |
|---|---|---|
| Compatibility | High-fidelity VS Code renderer environment to maximize Sky's reusability | Preload.ts, Polyfills/, Types/ |
| Modularity | Each service follows an atomic directory structure with interface, implementation, tag, layer, and type subdirectories | Effect/ services |
| Robustness | Effect-TS powers all service implementations, ensuring tagged error types and composable DI via Layer | All Effect/ services with Layer and Tag patterns |
| Abstraction | Clean layer over Tauri APIs replaces untyped Electron IPC with typed Tauri commands | Preload.ts, Effect/IPC/, Effect/Mountain/ |
| Integration | Sky's frontend requests connect to Mountain's backend through Tauri's invoke and event system | Preload.ts (ipcRenderer shim), Effect/Mountain/ |
Wind is the middle layer between Sky (the UI) and Tauri / Mountain (the backend). It provides the service abstraction that Sky consumes to perform file operations, dialogs, configuration, and state management โ all through typed, tagged Effect services rather than untyped IPC. Communication flows through Tauri's invoke (request) and event (notification) channels.
- Depends on:
Mountain(Rust backend handlers),Tauri(invoke/event system) - Consumed by:
Sky(Astro UI layer),Cocoon(extension host),Worker(service worker) - Protocol: Tauri IPC (
invoke+listen)
pnpm add @codeeditorland/windKey Dependencies:
| Package | Version | Purpose |
|---|---|---|
@tauri-apps/api |
2.11.0 |
Tauri JS bridge |
@tauri-apps/plugin-dialog |
2.7.1 |
Native OS file dialogs |
@codeeditorland/output |
0.0.1 |
Shared output utilities |
effect |
3.21.2 |
Structured concurrency & DI |
@effect/platform |
0.96.1 |
Platform abstractions for Effect |
Wind is integrated via its Preload.ts script and Effect-TS layers.
-
Integrate the Preload Script: Configure
tauri.config.jsonto include the bundledPreload.jsfrom Wind in your main window's preload scripts. -
Use Services with
Effect-TS:
import { IPC } from "@codeeditorland/wind/Effect";
import { TauriLiveLayer } from "@codeeditorland/wind/Effect/Layers/Tauri";
import { Effect, Layer, Runtime } from "effect";
// Build the application runtime with Tauri live layer
const AppRuntime = Layer.toRuntime(TauriLiveLayer).pipe(
Effect.scoped,
Effect.runSync,
);
// Example: invoke a Tauri command through the typed IPC service
const InvokeEffect = Effect.gen(function* (_) {
const IPCService = yield* _(IPC);
const Result = yield* _(
IPCService.invoke("mountain_get_workbench_configuration"),
);
yield* _(Effect.log(`Configuration received: ${JSON.stringify(Result)}`));
});
Runtime.runPromise(AppRuntime, InvokeEffect);| Service | Import Path | Description |
|---|---|---|
IPC |
@codeeditorland/wind/Effect |
Inter-process communication via Tauri |
Sandbox |
@codeeditorland/wind/Effect |
Preload globals and environment |
Configuration |
@codeeditorland/wind/Effect |
Workbench configuration with sync |
Telemetry |
@codeeditorland/wind/Effect |
Logging, spans, and metrics |
Mountain |
@codeeditorland/wind/Effect |
Backend RPC connection |
MountainSync |
@codeeditorland/wind/Effect |
Background configuration sync |
Environment |
@codeeditorland/wind/Effect |
System and platform detection |
Health |
@codeeditorland/wind/Effect |
Service health checks |
Bootstrap |
@codeeditorland/wind/Effect |
Multi-stage bootstrap orchestration |
Clipboard |
@codeeditorland/wind/Effect |
System clipboard access |
Commands |
@codeeditorland/wind/Effect |
VS Code command registry |
Editor |
@codeeditorland/wind/Effect |
Editor service abstraction |
ActivityBar |
@codeeditorland/wind/Effect |
Activity bar management |
Panel |
@codeeditorland/wind/Effect |
Bottom panel management |
Sidebar |
@codeeditorland/wind/Effect |
Sidebar management |
StatusBar |
@codeeditorland/wind/Effect |
Status bar management |
Decorations |
@codeeditorland/wind/Effect |
Editor decoration service |
Extensions |
@codeeditorland/wind/Effect |
Extension management |
Files |
@codeeditorland/wind/Effect |
File system operations |
History |
@codeeditorland/wind/Effect |
Editor history |
Keybinding |
@codeeditorland/wind/Effect |
Keyboard shortcut binding |
Label |
@codeeditorland/wind/Effect |
Label service |
Language |
@codeeditorland/wind/Effect |
Language service |
Lifecycle |
@codeeditorland/wind/Effect |
Application lifecycle |
Model |
@codeeditorland/wind/Effect |
Text model service |
Notification |
@codeeditorland/wind/Effect |
Notification service |
Output |
@codeeditorland/wind/Effect |
Output panel service |
Progress |
@codeeditorland/wind/Effect |
Progress indication |
QuickInput |
@codeeditorland/wind/Effect |
Quick input UI |
Search |
@codeeditorland/wind/Effect |
Search service |
Storage |
@codeeditorland/wind/Effect |
Persistent storage |
Terminal |
@codeeditorland/wind/Effect |
Terminal service |
TextFile |
@codeeditorland/wind/Effect |
Text file service |
TextModelResolver |
@codeeditorland/wind/Effect |
Text model resolver |
Themes |
@codeeditorland/wind/Effect |
Theme management |
WorkingCopy |
@codeeditorland/wind/Effect |
Working copy service |
Workspaces |
@codeeditorland/wind/Effect |
Workspace management |
NetworkRestrictions |
@codeeditorland/wind/Effect |
Network access restrictions |
UserSettings |
@codeeditorland/wind/Effect |
User settings bridge |
Vine |
@codeeditorland/wind/Effect |
Notification stream |
LandWorkbench |
@codeeditorland/wind/Effect |
Land workbench integration |
Layers/Tauri |
@codeeditorland/wind/Effect/Layers/Tauri |
Complete Tauri layer stack |
Layers/Electron |
@codeeditorland/wind/Effect/Layers/Electron |
Electron compatibility layer stack |
Layers/Test |
@codeeditorland/wind/Effect/Layers/Test |
Test/mock layer stack |
FileSystem |
@codeeditorland/wind/FileSystem |
VS Code-like file system provider |
Workbench |
@codeeditorland/wind/Workbench |
Workbench integration service |
- Effect Service Interfaces โ All Effect-TS service tags, interfaces, and implementations
- Preload API โ Environment shim and window.vscode globals
- Layer Compositions โ Tauri, Electron, and Test layer stacks
- Architecture Overview โ Internal module structure
- Why Effect-TS โ Design rationale for Effect-TS
- Why Tauri โ Design rationale for Tauri
- Land Documentation โ Complete documentation index
- Sky โ๏ธ โ UI component layer that consumes Wind services
- Cocoon ๐ฆ โ Extension host sidecar (correlated frontend element)
- Worker โ๏ธ โ Service worker for caching and offline support
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.
See CHANGELOG.md for a history of changes specific to Wind ๐ฌ๏ธ.
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, under grant agreement No 101135429.
Project Maintainers: Source Open (Source/Open@editor.land) | GitHub Repository | Report an Issue | Security Policy