Skip to content

Commit ea5c7e0

Browse files
committed
fix: add main() function for checksum_updater_wasm_bin rust_binary target
1 parent e5fb809 commit ea5c7e0

File tree

1 file changed

+12
-0
lines changed
  • tools/checksum_updater_wasm/src

1 file changed

+12
-0
lines changed

tools/checksum_updater_wasm/src/main.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ pub extern "C" fn _start() {
107107
}
108108
}
109109

110+
// Native binary entry point (for rust_binary target)
111+
#[cfg(not(target_arch = "wasm32"))]
112+
fn main() {
113+
match run_component() {
114+
Ok(_) => {},
115+
Err(e) => {
116+
eprintln!("❌ Failed: {}", e);
117+
std::process::exit(1);
118+
}
119+
}
120+
}
121+
110122
fn run_component() -> Result<()> {
111123
// Parse command line arguments
112124
let args = std::env::args().collect::<Vec<_>>();

0 commit comments

Comments
 (0)