Installation

Add oximo to a Rust project and configure an optional solver backend.

For most projects, installation is one command. The default oximo build provides the modeling layer and file I/O. Solver backends are opt-in.

This site is a guide for tutorials and worked examples. For the complete API reference, see docs.rs/oximo.

🔗Start here

oximo requires Rust 1.89 or later (edition 2024). Install Rust with rustup if you do not already have it.

Create a project and add oximo:

cargo new my-oximo-model --edition 2024
cd my-oximo-model
cargo add oximo

This default dependency is enough to construct models and use the MPS, LP, and NL I/O APIs. Choose a solver feature before solving a model.

🔗HiGHS

HiGHS is a bundled LP/MILP/QP solver. Enable it by doing:

cargo add oximo --features highs

The HiGHS build requires a C/C++ compiler:

  • On Windows, install the MSVC C++ build tools.
  • On macOS, run xcode-select --install.
  • On Linux, install your distribution's standard C/C++ build tools.

Then follow the Quickstart to solve the example model.

🔗Clarabel

Clarabel is a pure-Rust solver for continuous LP, QP, and SOCP models:

cargo add oximo --features clarabel

Use this path when you want a solver without a C compiler or external solver installation. Clarabel does not solve mixed-integer models.

🔗Clarabel SDP

Semidefinite programming (SDP) support is available by choosing one BLAS/LAPACK provider:

FeatureProviderTypical platform
clarabel-sdp-openblasOpenBLASLinux; source builds need C and Fortran compilers
clarabel-sdp-mklIntel MKLWindows or Linux
clarabel-sdp-accelerateApple AcceleratemacOS

The bare clarabel-sdp feature enables SDP when your application supplies BLAS/LAPACK linkage. On Windows, the OpenBLAS feature uses a system installation.

See Modeling > Semidefinite constraints for more information.

🔗Other backends

The Solvers guide compares model-kind support and summarizes the installation requirements of every backend. Enable a backend with its feature, for example:

[dependencies]
oximo = { version = "0.7", features = ["pounce"] }

With no solver feature, you can still construct models and export them through the default io feature.

🔗Advanced: exact nonlinear derivatives

pounce uses finite-difference derivatives for nonlinear expressions by default. The nightly-only pounce-enzyme feature provides exact gradients, Jacobians, and Hessians through Enzyme.

It requires a nightly Rust toolchain with the enzyme component, RUSTFLAGS="-Zautodiff=Enable", and a fat-LTO profile:

RUSTFLAGS="-Zautodiff=Enable" cargo +nightly build --profile enzyme --features pounce-enzyme

🔗Feature reference

FeatureIncluded by defaultPurpose
ioyesMPS, LP, and NL file readers and writers.
highsnoBundled Highs solver for LP, MILP, and QP.
baronnoBaron global-optimization backend.
clarabelnoPure-Rust Clarabel solver for LP, QP, and SOCP.
clarabel-faernoUse Clarabel's faer linear-algebra backend.
clarabel-sdpnoClarabel SDP with supplied BLAS/LAPACK linkage.
clarabel-sdp-openblasnoClarabel SDP with OpenBLAS.
clarabel-sdp-mklnoClarabel SDP with Intel MKL.
clarabel-sdp-acceleratenoClarabel SDP with Apple Accelerate.
gurobinoGurobi backend.
gamsnoGams bridge.
pouncenoPure-Rust Pounce solver for continuous nonlinear models.
pounce-enzymenoExact Enzyme derivatives for POUNCE; requires nightly Rust.
scipnoBundled Scip solver. Downloads SCIP binaries at build time.
scip-systemnoScip backend using an existing installation and libclang.
moseknoMosek backend for MOSEK 11.2.