Expand description
Main application entry point and orchestration.
§Binary::Main
Application orchestration layer providing entry point, IPC command handlers, lifecycle management, and tray integration for the Mountain desktop application.
§Module Layout
main.rs --> Binary::Main::Entry::Fn()
|
+-> Entry (Tokio runtime creation, Tauri builder)
+-> IPCCommands (all #[tauri::command] handlers)
+-> AppLifecycle(setup hook: tray, IPC server, window)
+-> Tray (SwitchTrayIcon Tauri command)§Error Handling
Entry::Fnpanics on fatal errors (Tokio runtime failure, Tauri build).- IPC commands return
Result<serde_json::Value, String>. - Lifecycle setup returns
Result<(), Box<dyn std::error::Error>>. - Non-critical failures are logged but do not prevent operation.
§Logging
Log prefixes used throughout: [Boot], [Lifecycle], [IPC], [UI].
No pub use re-exports - callers use the full path
Binary::Main::Entry::Fn() directly.
§Planned Work
- Comprehensive error recovery mechanism
- Startup progress indicator
- Graceful degradation for service failures
- Performance metrics collection
Modules§
- AppLifecycle
- Application lifecycle management.
- Entry
- Main application entry point.
- IPCCommands
- IPC command handlers.
- Tray
- System tray commands.