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.85 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.

🔗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.6", 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
highsnoBundled Highs solver for LP, MILP, and QP.
ioyesMPS, LP, and NL file writers.
baronnoBaron global-optimization backend.
clarabelnoPure-Rust Clarabel solver for LP, QP, and SOCP.
clarabel-faernoUse Clarabel's faer linear-algebra backend.
gurobinoGurobi backend.
gamsnoGams bridge.
pouncenoPure-Rust Pounce solver for continuous nonlinear models.
pounce-enzymenoExact Enzyme derivatives for POUNCE; requires nightly Rust.
moseknoMosek backend for MOSEK 11.2.