openblas-src 0.10.0

The package provides a source of BLAS and LAPACK via OpenBLAS.
Documentation

openblas-src Package Documentation Build

The package provides a source of BLAS and LAPACK via OpenBLAS.

The usage of the package is explained here.

The following Cargo features are supported:

  • cache to build in .cargo instead of target (see below),
  • cblas to build CBLAS (enabled by default),
  • lapacke to build LAPACKE (enabled by default),
  • static to link to OpenBLAS statically, and
  • system to skip building the bundled OpenBLAS.

Caching

The cache feature allows the OpenBLAS build products to be reused between crates that have different target directories. This avoids rebuilding OpenBLAS unnecessarily. However, this also prevents cargo clean from working properly, since the aforementioned build products will not be removed by the command.

Windows and vcpkg

On Windows, openblas-src relies on vcpkg to find OpenBLAS. Before building, you must have the correct OpenBLAS installed for your target triplet and kind of linking. For instance, to link dynamically for the x86_64-pc-windows-msvc toolchain, install openblas for the x64-windows triplet:

vcpkg install openblas --triplet x64-windows

To link statically, install openblas for the x64-windows-static triplet:

vcpkg install openblas --triplet x64-windows-static

Cross Compilation

Apart from providing the --target option to cargo build, one also has to specify the cross-compilation variables of OpenBLAS. They can be set as environment variables for cargo build using the OPENBLAS_ prefix as follows: OPENBLAS_CC, OPENBLAS_FC, OPENBLAS_HOSTCC, and OPENBLAS_TARGET.

Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.