oximo is solver-agnostic, and provides a variety of backends to solve your optimization models.
Every backend implements the same Solver trait, so swapping engines is a one-line change. The general pattern is:
let result = Backend.solve(&model, &BackendOptions::default())?;
result is a SolverResult, the same struct regardless of backend.
πChoosing a backend
To determine what backend to use, consider what each backend solves (by model kind) and what it costs and offers (license, install, diagnostics). Each backend's Cargo feature flag is named in its own section below.
πModel kind support
Each row is what Solver::supports accepts for that backend, against every ModelKind:
| Backend | LP | MILP | QP | MIQP | QCP | MIQCP | SOCP | MISOCP | NLP | MINLP |
|---|---|---|---|---|---|---|---|---|---|---|
Highs | β | β | β | β | β | β | β | β | β | β |
Clarabel | β | β | β | β | β | β | β | β | β | β |
Pounce | β | β | β | β | β | β | β | β | β | β |
Gurobi | β | β | β | β | β | β | β | β | β | β |
Mosek | β | β | β | β | β | β | β | β | β | β |
Baron | β | β | β | β | β | β | β | β | β | β |
Gams | β | β | β | β | β | β | β | β | β | β |
Gams accepts every kind at the oximo layer, but the actual coverage is the GAMS sub-solver's. Pick one that handles the kind you emit.
πRequirements & capabilities
Deployment cost and diagnostic/solve capability per backend.
β = yes/supported; β = no.
| Backend | License | Separate install | C compiler | Direct interface | IIS | Warm start | Sol. pool | Duals | Parallel |
|---|---|---|---|---|---|---|---|---|---|
Highs | β | β | β | β | ββ | β | β | β | β |
Clarabel | β | β | β | β | β | β | β | β | β |
Pounce | β | β | β | β | β | β | β | β | β |
Gurobi | β | β | β | β | β | β | β | β | β |
Mosek | β | β | β | β | β | β | β | β | β |
Baron | β | β | β | β | β | β | β | β | β |
Gams | β | β | β | β | β | β | βΒΆ | β | β |
Column meanings:
- License: the underlying solver is commercial and needs a license at runtime. The oximo wrapper crates are all MIT OR Apache-2.0.
- Direct interface: talks to the solver in-process. C API/FFI for HiGHS, Gurobi, and MOSEK. Pure Rust for Clarabel and Pounce. BARON and GAMS instead exchange model/result files (
.bar,.gms) with an external executable. - C compiler: whether a C/C++ compiler is required at build time.
- IIS: computes an irreducible infeasible set to explain an infeasible model.
- Warm start: persistent handle for incremental re-solves.
- Sol. pool: returns multiple solutions, best-first.
- Duals: shadow prices/reduced costs.
- Parallel: solver can solve in parallel.
Footnotes:
- β The
highscrate does not support IIS yet. - ΒΆ GAMS's pool and duals come from the underlying sub-solver's GDX output (e.g. CPLEX
solnpool).
A backend rejects model kinds it can't handle, so check Model::kind() if a solve returns SolverError::UnsupportedKind.
πHiGHS
Highs is bundled by default via the highs Cargo feature. No external install required, but a C/C++ compiler is needed at build time.
use oximo::prelude::*;
use oximo::solvers::Highs;
use std::time::Duration;
let result = Highs.solve(&m, &HighsOptions::default()
.time_limit(Duration::from_secs(60))
.threads(4)
.mip_gap(0.01)
.verbose(true)
.method(HighsMethod::Ipm))?;
Common HighsOptions:
| Method | Effect |
|---|---|
.time_limit(d) | Stop after d (std::time::Duration) |
.threads(n) | Cap parallelism |
.mip_gap(g) | Relative MIP optimality gap (e.g. 0.01 = 1%) |
.verbose(b) | Stream the solver log |
.method(m) | LP algorithm via HighsMethod (Simplex, Ipm, β¦) |
πClarabel
Clarabel is a pure-Rust conic interior-point solver. No install, no license. It handles continuous LP, QP (convex quadratic objectives), and SOCP models.
use oximo::prelude::*;
use oximo::solvers::Clarabel;
let result = Clarabel.solve(&m, &ClarabelOptions::default())?;πPOUNCE
Pounce is a pure-Rust port of IPOPT, covering continuous LP/QP/QCP/NLP. Enable the pounce feature.
use oximo::prelude::*;
use oximo::pounce::Pounce;
let result = Pounce.solve(&m, &PounceOptions::default())?;
Purely linear/quadratic models solve with exact analytic derivatives. Models containing a nonlinear function fall back to finite differences and an L-BFGS Hessian unless you enable the nightly-only pounce-enzyme feature, which supplies exact gradients plus sparse Jacobians and Hessians.
For any nonlinear model, enabling pounce-enzyme is highly recommended. Exact derivatives are faster and far more accurate than the finite-difference fallback, which improves both convergence and robustness. It requires a nightly toolchain and a fat-LTO build (see Installation > Advanced: exact nonlinear derivatives).
Note:
pounce-enzymecurrently requires thenightly-2026-07-26toolchain. Later nightly toolchains fail. See rust-lang/rust#160470.
πGurobi
Gurobi requires the gurobi Cargo feature, the grb
crate, and a licensed Gurobi installation. Set GUROBI_HOME to the installation
directory before building and make sure a Gurobi license is active.
Note: Only Gurobi v12 and later are supported.
[dependencies]
oximo = { version = "0.5", features = ["gurobi"] }use oximo::prelude::*;
use oximo::solvers::Gurobi;
use std::time::Duration;
let result = Gurobi.solve(&m, &GurobiOptions::default()
.time_limit(Duration::from_secs(120))
.mip_focus(1)
.seed(101))?;
Common GurobiOptions:
| Method | Effect |
|---|---|
.time_limit(d) | Wall-clock limit |
.mip_focus(n) | Gurobi MIPFocus (1 = feasibility, 2 = optimality, 3 = bound) |
.mip_gap(g) | Relative MIP optimality gap |
.seed(n) | Random seed for reproducible runs |
πMOSEK
Mosek supports LP, MILP, convex QP/MIQP, convex QCP/MIQCP, and
SOCP/MISOCP models. It requires the mosek Cargo feature, a licensed MOSEK
11.2 installation, and MOSEK_BINDIR_112 when MOSEK is outside its default
location. MOSEK validates the convexity of quadratic data. The backend links
through the mosek crate.
On Windows, setting MOSEK_BINDIR_112 directly to a path containing spaces can
fail because of an unquoted linker flag in the current mosek crate build
script. Create a junction with a space-free path and point the environment
variable at that junction; see mosek.rust#1.
Only MOSEK 11.2 is currently supported.
[dependencies]
oximo = { version = "0.5", features = ["mosek"] }use oximo::prelude::*;
use oximo::solvers::Mosek;
use std::time::Duration;
let result = Mosek.solve(&m, &MosekOptions::default()
.time_limit(Duration::from_secs(120))
.threads(4)
.mio_tol_rel_gap(1e-4))?;
MosekOptions provides builders for every MOSEK 11.2 parameter. Universal
options such as time_limit, threads, and verbose are applied first.
MOSEK-specific parameter builders are then applied in call order.
πBARON
Baron is a global solver for LP/MILP/QP/MIQP/QCP/MIQCP/SOCP/MISOCP/
NLP/MINLP models. The Oximo adapter supports all of these model kinds and
translates explicit second-order cones to BARON's quadratic constraint
representation. It requires the baron feature, a licensed BARON installation
on PATH, and exchanges model and result files with the external executable.
[dependencies]
oximo = { version = "0.5", features = ["baron"] }use oximo::prelude::*;
use oximo::solvers::Baron;
let result = Baron::new().solve(&m, &BaronOptions::default())?;πGAMS
Gams requires the gams Cargo feature plus a GAMS installation on
PATH. It exchanges model and result files with GAMS, which is useful when you
want to route a model through GAMS-managed solvers (CPLEX, BARON, IPOPT,
KNITRO, ...).
[dependencies]
oximo = { version = "0.5", features = ["gams"] }use oximo::prelude::*;
use oximo::solvers::Gams;
let result = Gams.solve(&m, &GamsOptions::default())?;
See GamsOptions and the per-solver option structs in oximo::gams (GamsCplexOptions, GamsBaronOptions, GamsIpoptOptions, ...) for tuning the underlying solver.
πNext steps
- Results: inspect solver status, values, duals, and solution pools
- Printing & Debugging: print a model as algebra and track down what it actually says
- I/O: write your model to MPS, LP or NL for use with external tools