# Generation of Custom Solvers in Rust for Convex Optimization

arXiv: https://arxiv.org/abs/2609.13875 · HTML: https://mlsanity.com/paper/2609.13875/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 14 of its 23 references that are in the map.
- First posted on arXiv 12 Sep 2026.

## Builds on (most cited first, 14 of 14)

- [Convex optimization](https://mlsanity.com/paper/2106.01946/) (2021)
- [CVXPY: A Python-Embedded Modeling Language for Convex Optimization](https://mlsanity.com/paper/1603.00943/) (2016)
- [Differentiable Convex Optimization Layers](https://mlsanity.com/paper/1910.12430/) (2019)
- [OSQP: An Operator Splitting Solver for Quadratic Programs](https://mlsanity.com/paper/1711.08013/) (2017)
- [acados: a modular open-source framework for fast embedded optimal control](https://mlsanity.com/paper/1910.13753/) (2019)
- [Clarabel: An interior-point solver for conic programs with quadratic objectives](https://mlsanity.com/paper/2405.12762/) (2024)
- [Convex Optimization in Julia](https://mlsanity.com/paper/1410.4821/) (2014)
- [Least Squares Auto-Tuning](https://mlsanity.com/paper/1904.05460/) (2019)
- [Markowitz Portfolio Construction at Seventy](https://mlsanity.com/paper/2401.05080/) (2024)
- [Differentiating Through a Quadratic Cone Program](https://mlsanity.com/paper/2508.17522/) (2025)
- [Portfolio Construction with Gaussian Mixture Returns and Exponential Utility via Convex Optimization](https://mlsanity.com/paper/2205.04563/) (2022)
- [Learning Accurate Whole-body Throwing with High-frequency Residual Policy and Pullback Tube Acceleration](https://mlsanity.com/paper/2506.16986/) (2025)
- [Embedded Code Generation with CVXPY](https://mlsanity.com/paper/2203.11419/) (2022)
- [Automatic Generation of Explicit Quadratic Programming Solvers](https://mlsanity.com/paper/2506.11513/) (2025)

## Abstract (arXiv)

We introduce cvxgenrust, an open-source tool for generating custom Rust code that solves families of parameterized convex optimization problems modeled in CVXPY. cvxgenrust canonicalizes a problem family, extracts affine maps to Clarabel cone-program data, and generates a specialized Rust crate that updates parameters and calls Clarabel natively at runtime. The generated solver can also be exposed to Python and registered as a custom CVXPY solver. Our code generator supports a wide range of convex optimization problems up to semidefinite programs and exponential-cone problems. Numerical experiments show reduced runtime relative to direct CVXPY solves and performance comparable to CVXPYgen on shared problem classes.
