arpack-sys
Raw FFI bindings to ARPACK-NG, the modernized fork of the ARPACK eigenvalue-solver library. Exposes the C-callable {s,d,c,z}{na,ne,sa,se}upd_c driver family introduced in ARPACK-NG 3.8.0.
For a safe Rust wrapper, depend on the arpack crate instead.
Status
The full driver surface is wrapped. Bindings are generated by bindgen and committed at src/bindings.rs, so downstream builds do not need bindgen or clang.
Supported targets
64-bit-pointer-width targets only. The safe wrapper's workspace-size arithmetic is bounded only by usize / isize::MAX, which on 32-bit sits within reach of mistaken inputs; rather than threading fallible allocation everywhere, arpack-sys enforces 64-bit-only at compile time via compile_error!. Open an issue if you need 32-bit support.
Linking model
arpack-sys links to a system-installed ARPACK-NG (>= 3.8.0) located via pkg-config. There is no vendored Fortran build — install ARPACK-NG through your platform package manager:
# macOS
# Debian / Ubuntu
# Fedora
pkg-config --modversion arpack must succeed before cargo build.
Integer ABI
The committed bindings target ARPACK-NG's default 32-bit-integer ABI (a_int = int). The build script reads arpackdef.h and rejects libraries built with INTERFACE64=1 (64-bit a_int) — silently using such a build would corrupt memory because the Rust side passes 32-bit ints. Rebuild ARPACK-NG with INTERFACE64=0 (the upstream default) if you hit this.
Regenerating bindings
To regenerate src/bindings.rs against a newer ARPACK-NG header, run from the workspace root:
bindgen and clang are required only for regeneration, not for downstream builds.
Thread safety
ARPACK-NG keeps state in Fortran SAVE variables and is not thread-safe — concurrent driver calls race on it. The safe wrapper (arpack) serializes every call through a process-wide mutex; if you use arpack-sys directly, you are responsible for the same discipline.
License
- These FFI bindings:
MIT OR Apache-2.0 - ARPACK-NG itself:
BSD-3-Clause(upstreamCOPYING). Dynamically linked from a system installation; not redistributed by this crate.