Skip to content

Commit 79b20a4

Browse files
refactor(Mountain): extract binary entry point to dedicated Binary.rs
Move the main() function from Library.rs into a new Source/Binary.rs file and update Cargo.toml to point to the new entry point. This separates the library API from the binary configuration, following Rust best practices for crate organization.
1 parent 3c11448 commit 79b20a4

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[bin]]
22
name = "Mountain"
3-
path = "Source/Library.rs"
3+
path = "Source/Binary.rs"
44

55
[build-dependencies]
66
json5 = { workspace = true }

Source/Binary.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![allow(non_snake_case)]
2+
3+
//! Binary entry point for Mountain.
4+
5+
use Mountain::Binary;
6+
7+
/// Main entry point for both mobile and desktop builds.
8+
#[cfg_attr(mobile, tauri::mobile_entry_point)]
9+
fn main() { Binary::Main::Main(); }

Source/Library.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,3 @@ pub mod Workspace;
105105
// Entry Point
106106
pub mod Binary;
107107

108-
/// Main entry point for both mobile and desktop builds.
109-
/// Delegates to the primary binary logic in the Binary module.
110-
#[cfg_attr(mobile, tauri::mobile_entry_point)]
111-
fn main() { Binary::Main::Main(); }

0 commit comments

Comments
 (0)