extern crate failure; extern crate libloading; use std::ffi::CStr; #[allow(non_camel_case_types, non_upper_case_globals, non_snake_case, dead_code)] mod libretro_types; mod libretro_loading; mod libretro_convert; fn main() -> failure::Fallible<()> { let lib = libloading::Library::new("/home/lifning/.config/retroarch/cores/gambatte_libretro.so")?; let retro = libretro_loading::LibretroApi::from_library(&lib)?; unsafe { println!("api version: {}", (&retro.retro_api_version)()); println!("name: {}", CStr::from_ptr(retro.get_system_info().library_name).to_string_lossy()); } Ok(()) }