arpack-sys 0.0.2

FFI bindings to ARPACK-NG (system-linked via pkg-config)
Documentation
  • Coverage
  • 6.25%
    1 out of 16 items documented0 out of 1 items with examples
  • Size
  • Source code size: 20.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 462.96 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ultimatile/arpack-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ultimatile

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
brew install arpack

# Debian / Ubuntu
sudo apt install libarpack2-dev pkg-config

# Fedora
sudo dnf install arpack-devel pkgconf-pkg-config

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:

./regen-bindings.sh

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 (upstream COPYING). Dynamically linked from a system installation; not redistributed by this crate.