math.OCSep 12, 2026

Generation of Custom Solvers in Rust for Convex Optimization

Authors: Hao Zhu, Joschka Boedecker

Organizations: IMBIT//BrainLinks-BrainTools · Department of Computer Science, University of Freiburg

Abstract

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.

Figures & tables

Explore similar work

CardsList
  1. Disciplined Biconvex Programming

    Nov 3, 2025Hao Zhu, Joschka BoedeckerNonconvex OptimizationConstrained Optimization

  2. Basin: Efficient and Extensible Numerical Optimization in Rust

    Aug 11, 2026Johan LarssonConstrained Optimization