bobyqa 0.1.1

Dependency-free BOBYQA: derivative-free minimization of a box-constrained function from values alone — a faithful pure-Rust port of PRIMA.
Documentation
[package]
name = "bobyqa"
version = "0.1.1"
edition = "2024"
rust-version = "1.85"
authors = ["Paweł Lenartowicz <pawellenartowicz@europe.com>"]
description = "Dependency-free BOBYQA: derivative-free minimization of a box-constrained function from values alone — a faithful pure-Rust port of PRIMA."
repository = "https://github.com/pawlenartowicz/bobyqa"
documentation = "https://docs.rs/bobyqa"
readme = "README.md"
license = "MIT OR Apache-2.0"
keywords = ["optimization", "bobyqa", "derivative-free", "minimization", "powell"]
categories = ["mathematics", "science", "algorithms"]
# The parity battery and its ~5 MB of frozen PRIMA trajectory/state dumps are a CI-only asset —
# they live in git for CI but are not shipped to downstream users.
exclude = ["tests/"]

# Zero runtime dependencies: the golden parser is hand-rolled, and the bit-exact parity
# discipline never needed `approx`.

# Dev-only: criterion drives benches/solver.rs, the warm-path per-call cost bench behind
# every optimization adoption decision. Dev-dependencies never reach downstream users.
[dev-dependencies]
criterion = { version = "0.5", default-features = false }

[[bench]]
name = "solver"
harness = false

# `unsafe_code = "forbid"` deliberately lives in src/lib.rs (`#![forbid(unsafe_code)]`),
# not here: [lints] applies to every target in the package, `forbid` cannot be
# overridden by attributes, and tests/alloc.rs needs a dev-only
# `unsafe impl GlobalAlloc`.

[features]
# Dev-only kernel-invocation counter. OFF by default: the shipped library has no global
# mutable state. Mirrors tests/alloc.rs's dev-only shim.
count-kernels = []

[lints.rust]
missing_docs = "deny" # the public API is fully documented; an undocumented public item fails the build

[lints.clippy]
all = { level = "deny", priority = 0 }
pedantic = { level = "warn", priority = -1 }
float_cmp = { level = "allow", priority = 1 }           # golden tests compare exact-where-the-reference-is-exact
cast_precision_loss = { level = "allow", priority = 1 } # usize<->f64 casts are routine in index/loop math

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1 # stable codegen across rebuilds; avoids FP-fusion reordering
# target-cpu left unset (portable + wasm-clean); no -ffast-math