Skip to main content

diffsol_c/
utils.rs

1/// get version of the library from Cargo.toml
2pub fn version() -> String {
3    env!("CARGO_PKG_VERSION").to_string()
4}
5
6/// Inidicate whether Klu functions are available.
7/// This depends on whether the library was built with suitesparse support.
8pub fn is_klu_available() -> bool {
9    cfg!(feature = "suitesparse")
10}
11
12/// Inidicate whether sensitivity analysis is available.
13/// Sensitivity analysis is currently limited to Linux and macos, and not supported for Windows.
14pub fn is_sens_available() -> bool {
15    cfg!(not(target_os = "windows"))
16}