use gtk::gio; extern crate adw; extern crate libsecret; #[link(name = "audrey")] #[link(name = "gcrypt")] #[link(name = "json-glib-1.0")] #[link(name = "mpv")] #[link(name = "soup-3.0")] extern "C" { fn c_main(argc: std::ffi::c_int, argv: *const *const std::ffi::c_char) -> std::ffi::c_int; } fn main() { gio::resources_register_include!("audrey.gresource").expect("could not register resources"); let args = std::env::args_os(); let argc = args.len(); let argv: Vec = args .map(|arg| std::ffi::CString::new(std::ffi::OsStr::as_encoded_bytes(&arg)).unwrap()) .collect(); let argv: Vec<*const std::ffi::c_char> = argv.iter().map(|arg| arg.as_ptr()).collect(); unsafe { std::process::exit(c_main(argc as std::ffi::c_int, argv.as_ptr())) } }