#optimization #math #science #nonlinear-equations


A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations

5 unstable releases

0.3.1 May 8, 2022
0.3.0 May 8, 2022
0.2.1 Feb 7, 2022
0.2.0 Jan 27, 2022
0.1.0 Dec 20, 2021

#646 in Math

24 downloads per month

MIT license



A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations.

Warning: The code and API are still quite rough. Expect changes.

This library provides a variety of solvers of nonlinear equation systems with n equations and n unknowns written entirely in Rust. Bound constraints for variables are supported first-class, which is useful for engineering applications. All solvers implement the same interface which is designed to give full control over the process and allows to combine different components to achieve the desired solution. The implemented methods are historically-proven numerical methods or global optimization algorithms.

The convergence of the numerical methods is tested on several problems and the implementation is benchmarked against with GSL library.


  • Trust region -- Recommended method to be used as a default and it will just work in most of the cases.
  • Cuckoo search -- A global optimization algorithm useful for initial guesses search in combination with a numerical solver.
  • Steffensen -- Fast and lightweight method for one-dimensional systems.
  • Nelder-Mead -- Not generally recommended, but may be useful for low-dimensionality problems with ill-defined Jacobian matrix.


Listed not in order of priority.

  • Homotopy continuation method to compare the performance with Trust region method.
  • Conjugate gradient method
  • Experimentation with various global optimization techniques for initial guesses search
    • Evolutionary/nature-inspired algorithms
    • Bayesian optimization
  • Focus on initial guesses search and tools in general
  • High-level drivers encapsulating the low-level API for users that do not need the fine-grained control.


Licensed under MIT.

There are gsl-wrapper and gsl-sys crates which are licensed under the GPLv3 identically as GSL itself. This code is part of the repository, but is not part of the Gomez library. Its purpose is solely for comparison in Gomez benchmarks.


~104K SLoC