13 unstable releases

0.7.0 Dec 10, 2023
0.6.0 Jun 16, 2022
0.5.4 Apr 21, 2021
0.5.3 Jan 19, 2021
0.3.2 Jul 25, 2018

#277 in Algorithms

Download history 473/week @ 2024-07-30 338/week @ 2024-08-06 558/week @ 2024-08-13 681/week @ 2024-08-20 452/week @ 2024-08-27 631/week @ 2024-09-03 545/week @ 2024-09-10 383/week @ 2024-09-17 563/week @ 2024-09-24 545/week @ 2024-10-01 678/week @ 2024-10-08 715/week @ 2024-10-15 733/week @ 2024-10-22 449/week @ 2024-10-29 284/week @ 2024-11-05 635/week @ 2024-11-12

2,261 downloads per month
Used in 7 crates (6 directly)

MIT license

2MB
36K SLoC

C 22K SLoC // 0.2% comments FORTRAN Legacy 7K SLoC // 0.4% comments SWIG 2.5K SLoC // 0.2% comments C++ 2.5K SLoC // 0.1% comments Rust 1.5K SLoC // 0.0% comments Objective-C 623 SLoC FORTRAN Modern 53 SLoC Scheme 37 SLoC Python 27 SLoC Shell 22 SLoC

crates.io Build Status Documentation

nlopt

Thin wrapper around the C nlopt library.

Building

You will need cmake to build successfully. It should be easy to find on your favourite package manager.

Examples

For a basic usage examples, see the /examples directory. Run with

cargo run --example bobyqa
cargo run --example mma

See also the tests in src/lib.rs. Run them with

cargo test

Attribution

This library was originally forked from https://github.com/mithodin/rust-nlopt.

License

The Rust code is licensed under MIT.

For convenience, this crate bundles nlopt and links it statically. This may have licensing implications so I refer the user to the bundled license for more information.

No runtime deps