Open cisen opened 4 years ago
https://github.com/nagisa/rust_libloading/
extern crate libloading as lib; fn call_dynamic() -> Result<u32, Box<dyn std::error::Error>> { let lib = lib::Library::new("/path/to/liblibrary.so")?; unsafe { let func: lib::Symbol<unsafe extern fn() -> u32> = lib.get(b"my_func")?; Ok(func()) } }
https://github.com/nagisa/rust_libloading/