no-more-secrets-rust/src/lib.rs

22 lines
366 B
Rust
Raw Normal View History

2023-07-23 03:04:59 -07:00
mod args;
2023-07-23 03:03:23 -07:00
2023-07-23 03:14:38 -07:00
use libc::{c_void, c_int};
extern {
fn nmseffect_set_autodecrypt(_: c_int) -> c_void;
}
2023-07-23 03:03:23 -07:00
#[no_mangle]
pub extern "C" fn rust_main() {
println!("Hello from rust");
2023-07-23 03:14:38 -07:00
let args = args::parse_arguments().unwrap();
if args.autodecrypt {
unsafe {
nmseffect_set_autodecrypt(1);
}
}
println!("{:?}", args);
2023-07-23 03:03:23 -07:00
}