This reository contains the code for reproducing the numerical results in the paper "Generation of custom solvers in Rust for convex optimization".
- Python 3.12 or newer
- Rust and Cargo
- CMake and a C/C++ build toolchain
We use uv to manage the Python environment.
Once you have uv installed, create the environment and install dependencies:
make syncThis runs uv sync --frozen, which should leave the environment exactly at the
versions recorded in uv.lock.
Run the complete configured experiment:
make experimentThis target:
- generates cvxgenrust and CVXPYgen projects under
artifacts/generated; - builds the generated Rust and C drivers;
- runs all configured warmups and timing samples;
- writes
results/solve_times.csv,results/environment.json,results/summary.md, and plots underresults/plots; - validates row counts, solver statuses, and objective-error tolerances.
The default configuration is benchmarks.toml, which uses 3 warmups, 30 timing
samples, seed 10015, and the CLARABEL solver settings listed in that file.
If results/solve_times.csv already exists, regenerate the Markdown summary and
plots without rerunning benchmarks:
make reportFor plots only:
make plotReuse existing generated projects and skip generation:
make run-skip-generateRemove generated artifacts and result files:
make cleanThe paper-style PDF plot in results/plots/solve_times.pdf is generated by:
uv run python src/paper.py