@@ -48,13 +48,16 @@ ndarray-blas = ["ndarray", "ndarray/blas"]
4848# is the home of `ComplexField` / `RealField` — bounds the faer-backend
4949# linalg impls need to remain F-generic.
5050faer = [" dep:faer" , " dep:generativity" , " dep:faer-traits" ]
51- # Opt-in parallel evaluation (currently faer's rayon-backed linalg). Off by
52- # default because basin is typically embedded inside a caller that already
53- # manages parallelism (multi-start sweeps, R/Python schedulers, outer rayon
54- # loops) — a default-on thread pool causes oversubscription and fights the
55- # caller. WASM-incompatible: enabling this on wasm32-unknown-unknown will
56- # fail to compile. No-op unless a backend that hooks into it is also enabled.
57- parallel = [" faer?/rayon" ]
51+ # Opt-in parallel evaluation. Fans the independent probes of a
52+ # finite-difference gradient / Jacobian / Hessian across a `rayon` thread pool
53+ # (`FiniteDiff`, via `core::parallel`), and turns on faer's rayon-backed
54+ # linalg. Off by default because basin is typically embedded inside a caller
55+ # that already manages parallelism (multi-start sweeps, R/Python schedulers,
56+ # outer rayon loops) — a default-on thread pool causes oversubscription and
57+ # fights the caller. WASM-incompatible: enabling this on wasm32-unknown-unknown
58+ # will fail to compile. Under this feature `FiniteDiff: Gradient/Jacobian/
59+ # Hessian` additionally requires the wrapped problem to be `Sync`.
60+ parallel = [" dep:rayon" , " faer?/rayon" ]
5861# Standard test-problem corpus (Rosenbrock, ...). Pure-Rust, no extra deps;
5962# default-on so plain `cargo test` keeps working without `--features problems`
6063# (integration tests can't see `cfg(test)` lib gating). Downstream can drop
@@ -100,6 +103,10 @@ rand_chacha = { version = "0.10", default-features = false }
100103# Standard-normal sampling for CMA-ES. rand_distr 0.6 pairs with rand 0.10.
101104# default-features off to stay consistent with the wasm-safe rand setup.
102105rand_distr = { version = " 0.6" , default-features = false }
106+ # Opt-in CPU parallelism (the `parallel` feature only). Not wasm-compatible —
107+ # kept off by default per the WASM hard constraint. MSRV well under basin's
108+ # (rayon 1.x builds far below 1.87), so it doesn't constrain the CRAN pin.
109+ rayon = { version = " 1" , optional = true }
103110
104111[dev-dependencies ]
105112# Statistical bench harness. dev-dependency only — never enters the
0 commit comments