ipopt-src 0.2.1+3.14.14

Redistribution of Coin-OR Ipopt as a crate
docs.rs failed to build ipopt-src-0.2.1+3.14.14
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Ipopt-src

Package Documentation License

description

ipopt-src crate is a *-src crate. This links Ipopt libraries to executable build by cargo, but does not provide Rust bindings.

By this package, you don't need to worry about installing Ipopt in the system, and it's a package for all platforms.

Ipopt (Interior Point OPTimizer, pronounced eye-pea-Opt) is a software package for large-scale nonlinear optimization. It is designed to find (local) solutions of mathematical optimization problems of the NLP.

Usage

Just add the following to your Cargo.toml:

[dependencies]
ipopt-src = "0.2"

This package does not provide bindings.

Configuration

The following Cargo features are supported:

  • default to enable mumps with openblas-static;

There's one of the following solvers needed by ipopt(click Ipopt to get more information):

  • intel-mkl to build with Intel MKL;
  • mumps to build with Mumps;
  • hsl to build with HSL;(Not supported now)
  • spral to build with Spral;(Not supported now)
  • wsmp to build with WSMP;(Not supported now)

if intel-mkl is selected, you should choose one of the following linking mode:

  • mkl-static-lp64-seq to build with Intel MKL;
  • mkl-dynamic-lp64-seq to build with Intel MKL;

if mumps is selected, you should choose one of the following linking mode as mumps' liner solver:

  • mkl-static-lp64-seq to build with Intel MKL;
  • mkl-dynamic-lp64-seq to build with Intel MKL;
  • openblas-static to build with OpenBLAS and link as static;
  • openblas-dynamic to build with OpenBLAS and link as dynamic;

Windows and vcpkg

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

vcpkg install ipopt --triplet x64-windows

To link Ipopt statically, install ipopt for the x64-windows-static-md triplet:

vcpkg install ipopt --triplet x64-windows-static-md

To link Ipopt and C Runtime (CRT) statically, install ipopt for the x64-windows-static triplet:

vcpkg install ipopt --triplet x64-windows-static

and build with +crt-static option

RUSTFLAGS='-C target-feature=+crt-static' cargo build --target x86_64-pc-windows-msvc

Please see the "Static and dynamic C runtimes" in The Rust reference for detail.

Cross Compilation

Because [openblas-src]'s Issue #101, we can't cross compile the package with openblas-static feature. So, if you want to cross compile the package, you could use mike-kfed instead.

Add this to your project/.cargo/config.toml.

[patch.crates-io]
openblas-src = { git = "https://github.com/mike-kfed/openblas-src.git", branch = "arm-cross-compile" }

you can compile it for the other target by providing the --target option to cargo build.

Target supported
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
armv7-linux-androideabi
armv7-unknown-linux-gnueabi
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabi
armv7-unknown-linux-musleabihf
riscv64gc-unknown-linux-gnu
x86_64-pc-windows-msvc
x86_64-unknown-linux-gnu
others not test

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.