siann 1.0.0

Serve nearest-neighbor indexes built by the siann Python package (exact, IVF, CAGRA graphs) from Rust, on the CPU, with the same results
Documentation
//! With the `openblas` feature (not on macOS, which uses Accelerate): links the static OpenBLAS found in
//! SIANN_OPENBLAS_DIR (libopenblas.a, or openblas.lib on Windows), built single-threaded.

fn main() {
    println!("cargo:rerun-if-env-changed=SIANN_OPENBLAS_DIR");
    let openblas = std::env::var_os("CARGO_FEATURE_OPENBLAS").is_some();
    let macos = std::env::var("CARGO_CFG_TARGET_OS").is_ok_and(|os| os == "macos");
    if !openblas || macos {
        return;
    }
    let dir = std::env::var("SIANN_OPENBLAS_DIR").expect(
        "the openblas feature needs SIANN_OPENBLAS_DIR, the directory of a static OpenBLAS",
    );
    println!("cargo:rustc-link-search=native={dir}");
    println!("cargo:rustc-link-lib=static=openblas");
    if std::env::var("CARGO_CFG_TARGET_OS").is_ok_and(|os| os == "linux") {
        println!("cargo:rustc-link-lib=m");
        println!("cargo:rustc-link-lib=pthread");
    }
}