Skip to content
Rust interface to nlopt
Branch: master
Clone or download
Latest commit 7275386 Feb 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
.gitignore
Cargo.toml
LICENSE
README.md

README.md

nlopt

Thin wrapper around the C nlopt library.

Note: Most functionality has been implemented, but not all has been tested working.

Docs

Building

This crate depends upon nlopt and will fail if it cannot find a library to link against. It has been tested against nlopt v2.5.0 - it may or may not work against other versions.

The source can be downloaded from the official site, which also has provides build instructions.

Note you may find it more convenient the build nlopt as a static library, by passing -DBUILD_SHARED_LIBS=OFF to cmake.

The resulting C-lib must be on the search path at link-time. This can be set with environment variables, the rustc command or a build.rs script.

Tests

cargo test

(This is a quick way to check the C-lib can be found).

Examples

For a basic usage example, see examples/bobyqa.rs. Run with

cargo run --example bobyqa

See also the tests in src/lib.rs

Attribution

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

You can’t perform that action at this time.