Function library_filename

Source
pub fn library_filename(lib_name: &str, toolchain: &str) -> String
Expand description

Returns the filename of a Dylint library.

ยงExamples

use dylint_internal::library_filename;

#[cfg(target_os = "linux")]
assert_eq!(
    library_filename("foo", "stable-x86_64-unknown-linux-gnu"),
    "libfoo@stable-x86_64-unknown-linux-gnu.so"
);

#[cfg(target_os = "macos")]
assert_eq!(
    library_filename("foo", "stable-x86_64-apple-darwin"),
    "libfoo@stable-x86_64-apple-darwin.dylib"
);

#[cfg(target_os = "windows")]
assert_eq!(
    library_filename("foo", "stable-x86_64-pc-windows-msvc"),
    "foo@stable-x86_64-pc-windows-msvc.dll"
);