4141
4242# ** Mountain** ⛰️ Deep Dive & Architecture
4343
44- This document provides a detailed technical overview of the ** Mountain** project
45- for developers. It explores the native backend architecture, Tauri integration,
46- gRPC communication systems, and the high-performance service implementations
47- that form the bedrock of the Land Code Editor ecosystem while lifting VSCode
48- services into the Tauri framework.
44+ This document provides the technical foundation for implementing VSCode services
45+ as native Rust services within the Land ecosystem. ** Mountain** serves as the
46+ concrete implementation layer that brings VSCode service compatibility through
47+ native Rust implementations, Tauri integration, and gRPC communication.
4948
5049---
5150
@@ -62,15 +61,15 @@ services into the Tauri framework.
6261
6362---
6463
65- ## Deep Dive into ` Mountain ` 's Practical Components
64+ ## Deep Dive into ` Mountain ` 's Concrete Components
6665
6766### 1. The ` ApplicationRunTime ` Engine: Concrete Effect Execution
6867
6968The ` ApplicationRunTime ` serves as the bridge between the declarative effect
7069system defined in ` Common ` and the concrete native implementations provided by
7170Mountain.
7271
73- #### ** Practical Effect Execution Flow**
72+ #### ** Concrete Effect Execution Flow**
7473
7574``` mermaid
7675sequenceDiagram
@@ -118,7 +117,7 @@ impl ApplicationRunTime for MountainRunTime {
118117}
119118```
120119
121- ### 2. Practical State Management Architecture
120+ ### 2. Concrete State Management Architecture
122121
123122The ` ApplicationState ` system provides concrete state management with advanced
124123concurrency guarantees:
@@ -178,7 +177,7 @@ impl ApplicationState {
178177
179178### 3. Concrete gRPC Communication System
180179
181- The ` Vine ` gRPC layer provides practical communication with the ` Cocoon `
180+ The ` Vine ` gRPC layer provides concrete communication with the ` Cocoon `
182181extension host:
183182
184183``` mermaid
@@ -229,7 +228,7 @@ impl VineService for MountainVineService {
229228}
230229```
231230
232- ### 4. Practical Process Management System
231+ ### 4. Concrete Process Management System
233232
234233The process management system provides concrete sidecar orchestration:
235234
@@ -725,7 +724,78 @@ mod performance_tests {
725724}
726725```
727726
728- Mountain represents the concrete implementation layer that brings VSCode service
729- compatibility to the Land ecosystem through native Rust implementations, Tauri
730- integration, and practical performance optimizations while maintaining type
731- safety and architectural integrity.
727+ ### Concrete VSCode Service Lifting Architecture
728+
729+ ``` mermaid
730+ graph TD
731+ subgraph "Mountain Service Implementation"
732+ CommonTraits["Common Traits"]
733+ MountainImpl["Mountain Implementation"]
734+ Tauri["Tauri Integration"]
735+ gRPC["gRPC Server"]
736+
737+ CommonTraits --> MountainImpl
738+ MountainImpl --> Tauri
739+ MountainImpl --> gRPC
740+ end
741+
742+ subgraph "Service Communication"
743+ Wind["Wind UI Services"]
744+ Cocoon["Cocoon Extension Host"]
745+
746+ Tauri --> Wind
747+ gRPC --> Cocoon
748+ end
749+
750+ subgraph "Native Integration"
751+ FileSystem["Native File System"]
752+ ProcessMgmt["Process Management"]
753+ WindowMgmt["Window Management"]
754+
755+ MountainImpl --> FileSystem
756+ MountainImpl --> ProcessMgmt
757+ MountainImpl --> WindowMgmt
758+ end
759+ ```
760+
761+ #### Service Implementation Table
762+
763+ | VSCode Service | Common Trait | Mountain Implementation | Communication Protocol |
764+ | :---------------------- | :--------------------- | :---------------------- | :--------------------- |
765+ | ` IFileService ` | ` FileSystemService ` | ` MountainFileSystem ` | gRPC + Tauri |
766+ | ` IWorkspaceService ` | ` WorkspaceService ` | ` MountainWorkspace ` | gRPC + Tauri |
767+ | ` IConfigurationService ` | ` ConfigurationService ` | ` MountainConfiguration ` | gRPC + Tauri |
768+ | ` ICommandService ` | ` CommandService ` | ` MountainCommand ` | gRPC + Tauri |
769+ | ` IDocumentService ` | ` DocumentProvider ` | ` MountainDocument ` | gRPC + Tauri |
770+
771+ ### Component Block Map
772+
773+ ``` mermaid
774+ graph TB
775+ subgraph "Mountain Architecture Blocks"
776+ ApplicationState["ApplicationState<br/>Central State"]
777+ ApplicationRunTime["ApplicationRunTime<br/>Effect Execution"]
778+ Environment["Environment<br/>Service Implementations"]
779+ ProcessManager["ProcessManager<br/>Sidecar Orchestration"]
780+ VineServer["Vine Server<br/>gRPC Communication"]
781+ end
782+
783+ subgraph "External Dependencies"
784+ Common["Common Traits"]
785+ Tauri["Tauri Framework"]
786+ Tokio["Tokio Runtime"]
787+ Echo["Echo Scheduler"]
788+ end
789+
790+ Common --> Environment
791+ Common --> ApplicationRunTime
792+ Tauri --> ApplicationState
793+ Tauri --> ProcessManager
794+ Tokio --> VineServer
795+ Echo --> ApplicationRunTime
796+
797+ ApplicationState --> Environment
798+ ApplicationRunTime --> Environment
799+ Environment --> VineServer
800+ ProcessManager --> VineServer
801+ ```
0 commit comments