pub fn library_filename<S>(name: S) -> OsStringExpand description
Builds a platform-specific dynamic library filename.
This is re-exported from libloading as a convenience when loading
libchoco_capi dynamically.
Converts a library name to a filename generally appropriate for use on the system.
This function will prepend prefixes (such as lib) and suffixes (such as .so) to the library
name to construct the filename.
ยงExamples
It can be used to load global libraries in a platform independent manner:
use libloading::{Library, library_filename};
// Will attempt to load `libLLVM.so` on Linux, `libLLVM.dylib` on macOS and `LLVM.dll` on
// Windows.
let library = unsafe {
Library::new(library_filename("LLVM"))
};