Mountain/
Library.rs

1#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
2#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
3
4//! # Library
5//!
6//! Library root module for the Mountain application, declaring all subsystem
7//! modules and providing the main entry point for the Tauri desktop framework.
8//!
9//! ## RESPONSIBILITIES
10//!
11//! ### Module Organization
12//! - Declare and export all Mountain subsystem modules
13//! - Provide clean module boundaries and visibility rules
14//! - Enable dependency management between components
15//! - Support both library and binary builds
16//!
17//! ### Entry Point
18//! - Provide mobile build entry point required by Tauri
19//! - Delegate to Binary module for main application logic
20//!
21//! ## ARCHITECTURAL ROLE
22//!
23//! ### Position in Mountain
24//! - Library root for the Mountain crate
25//! - Central module declaration point
26//! - Provides module visibility control
27//!
28//! ### Dependencies
29//! - Common: Shared infrastructure
30//! - Tauri: Desktop framework integration
31//!
32//! ### Dependents
33//! - Binary: Uses all modules for application initialization
34//!
35//! ## MODULE STRUCTURE
36//!
37//! ### Core Infrastructure
38//! - ApplicationState: Centralized state management
39//! - Environment: Capability provider and dependency injection
40//! - RunTime: Effect execution engine
41//!
42//! ### Communication
43//! - IPC: Inter-process communication
44//! - Air: AI/integration service client
45//! - Vine: gRPC inter-service communication
46//!
47//! ### Service Management
48//! - ProcessManagement: Sidecar process lifecycle
49//! - FileSystem: File system operations
50//! - ExtensionManagement: Extension discovery
51//!
52//! ### Commands & Features
53//! - Command: Native command implementations
54//! - Track: Command tracking and dispatch
55//! - Workspace: Workspace file parsing
56//!
57//! ### Entry Point
58//! - Binary: Main application entry point
59
60// ============================================================================
61// Core Infrastructure Modules
62// ============================================================================
63
64/// Centralized error handling system
65pub mod Error;
66
67pub mod ApplicationState;
68
69pub mod Environment;
70
71pub mod RunTime;
72
73// ============================================================================
74// Communication Modules
75// ============================================================================
76
77pub mod IPC;
78
79pub mod Air;
80
81pub mod Vine;
82
83pub mod RPC;
84
85// ============================================================================
86// Service Management Modules
87// ============================================================================
88
89pub mod ProcessManagement;
90
91pub mod FileSystem;
92
93pub mod ExtensionManagement;
94
95// ============================================================================
96// Command And Feature Modules
97// ============================================================================
98
99pub mod Command;
100
101pub mod Track;
102
103pub mod Workspace;
104
105// ============================================================================
106// Entry Point Module
107// ============================================================================
108
109pub mod Binary;
110
111// ============================================================================
112// Mobile Build Entry Point
113// ============================================================================
114
115/// Main entry point for mobile builds, which is required by Tauri but
116/// delegates to the primary binary logic in the Binary module.
117#[allow(dead_code)]
118#[cfg_attr(mobile, tauri::mobile_entry_point)]
119fn main() { Binary::Main::Main(); }