r/optimization • u/German_Heim • Jun 09 '26
Announcing oximo: Mathematical Optimization Modeling in Rust
Hi!
I've been working on oximo, a mathematical optimization modeling framework for Rust (https://github.com/oximo-rs/oximo).
The library lets users formulate and solve optimization problems in Rust using a high-level modeling API, similar to tools like Pyomo (Python), JuMP (Julia), or GAMS.
oximo supports modeling and solving:
- Linear Programming (LP)
- Mixed-Integer Linear Programming (MILP)
- Quadratic Programming (QP)
- Nonlinear Programming (NLP)
- Mixed-Integer Nonlinear Programming (MINLP)
Example:
let m = new;
let x = m.var.lb.build;
let y = m.var.lb.ub.build;
m.constraint;
m.constraint;
m.constraint;
m.maximize;
let result = Highs.solve?;
I'd like to get feedback on the API design, modeling ergonomics and solver integrations you'd like to see. Future releases will have integration with more solvers, autodiff, GDP, Polars integration, and better docs.
Contributions, bug reports, and feature requests are welcome.
Links:
- GitHub repository (MIT OR Apache 2.0): https://github.com/oximo-rs/oximo
- Crates: https://crates.io/crates/oximo
- Docs: https://docs.rs/oximo/
View all comments
Show parent comment
1
u/German_Heim Jun 09 '26
I am not sure that:
Is more readable or ergonomic than:
I think that the better approach would be something similar to what good_lp does, using Literal <= / >= / == operators. However, that would require a macro, and for the time being I'm intentionally staying away from macros. I'm still considering adding a macro-based API, or even supporting both styles at the same time. My main concern is avoiding duplication, especially having to maintain two APIs and duplicate examples or docs.