mod args; use libc::{c_int, c_void}; const VERSION: &str = "2.0.0"; extern "C" { fn nmseffect_set_autodecrypt(_: c_int) -> c_void; fn nmseffect_set_clearscr(_: c_int) -> c_void; static mut foregroundColor: c_int; } #[no_mangle] pub extern "C" fn rust_main() { println!("Hello from rust"); let args = args::parse_arguments().unwrap(); if args.version { println!("nms version {VERSION}"); std::process::exit(0); } if let Some(ref _color) = args.foreground { unsafe { foregroundColor = 5; } } if args.clear_screen { unsafe { nmseffect_set_clearscr(1); } } if args.autodecrypt { unsafe { nmseffect_set_autodecrypt(1); } } println!("{:?}", args); }