Skip to content

feat!: require Rust 1.95, the minimum genoxide keeps from now on - #422

Merged
tachsin merged 1 commit into
mainfrom
build/rust-1.95
Oct 2, 2026
Merged

tachsin merged 1 commit into
mainfrom
build/rust-1.95

Conversation

@tachsin

@tachsin tachsin commented Oct 2, 2026

Copy link
Copy Markdown
Owner

The decision in #402: the minimum supported Rust version moves from 1.88 to 1.95, and stays there.

Changes:

  • rust-version = "1.95" in Cargo.toml and python/Cargo.toml.
  • The CI job MSRV (1.95), on dtolnay/rust-toolchain@1.95.
  • ROADMAP.md: the MSRV line, and a 0.14 entry.

Checked:

  • cargo +1.95 check --all-targets --all-features passes.
  • Clippy with -D warnings, default and --all-features and on the Python crate, finds nothing new under the new rust-version.

What 1.95 allows (#402), each to be adopted in its own PR, measured by the benchmarks and the bit-identical tests:

  • core::hint::cold_path (1.95) for rare branches in hot code;
  • array_windows (1.94);
  • as_array (1.93), cfg_select! (1.95) and carrying_mul (1.91).

Compiler improvements, LLVM 23 included, come with whatever toolchain users build with, whatever the minimum.

Who is affected: builds from source on a compiler older than 1.95, such as distribution packages up to Ubuntu 26.04's 1.93. rustup users and the Python wheels are unaffected. This is a breaking change, so the next release is a minor one.

@tachsin
tachsin merged commit 2e4f89a into main Oct 2, 2026
22 checks passed
@tachsin
tachsin deleted the build/rust-1.95 branch October 2, 2026 19:34
tachsin added a commit that referenced this pull request Oct 2, 2026
…esult unchanged (#424)

The follow-up to #402 and #422: the APIs that Rust 1.95 allows, plus the
older ones #402 listed as "usable now". One topic per commit, each
measured in instruction counts against its parent. Every seeded result
is identical to the bit: `portable_runs`, the linalg fixed-bit tests,
and all 223 examples against their `output.txt`.

**Instruction counts, this branch against main** (valgrind, gungraun
0.19.4, Rust 1.99, one codegen unit). No benchmark gained.

| Benchmark | Change |
|---|---|
| L-BFGS-B rounds, n = 1000 | −4.94% |
| L-BFGS-B with forward differences | −1.11% |
| gemm, n = 64 | −3.13% |
| Cholesky, n = 200 | −0.81% |
| CMA-ES sep-100 | −1.24% |
| CMA-ES 10 | −0.29% |
| DE generation | −0.12% |

**Kept:**
- **`core::hint::cold_path`** (1.95) on `ln`'s special cases, the source
of the CMA-ES and DE gains, and on `exp`, a NaN violation, the Cholesky
pivot, L-BFGS-B's projected gradient and Nelder-Mead's mirror.
- **`array_windows`** (1.94) in Rosenbrock, Dixon-Price, Trid, Penalized
1 and 2, Schaffer F7, Kursawe, the gradients, the crowding distance,
`nn` and more. The same float operations, in the same order.
- **Slices cut to n** in `gemv` and in L-BFGS-B's O(n) loops, which
removes their bounds checks. This is the −4.94%.
- **`as_chunks_mut`** in gemm's A panel and in the Cholesky update's
panel.
- **`#[expect]` in place of `#[allow]`.** This removed the stale
`dead_code` allows of `cholesky` and `triangular`, which L-BFGS-B uses
now, and a stale `type_complexity`.
- **For clarity, with counts unchanged:** `split_off`,
`split_last_chunk` and `as_array` in checkpoints; `carrying_mul` in
`below_u64`; `isqrt` in SPEA2 (the same k for every n up to 2^28);
`is_multiple_of`.

**Dropped, measured:**
- **`cold_path` in `below_u64`:** tournament selection −2.9%, but DE
+1.6%.
- **`cold_path` in `Fitness::try_new`:** the fitness loop −8.5%, but the
OneMax run +1.45%.
- **`cold_path` on L-BFGS-B's skipped pair:** a small cost.
- **`as_chunks_mut` for the Cholesky column tiles:** +0.87%.
- **`f64::midpoint` in DE:** identical to the bit over 200M pairs and
every class of f64, but DE +0.39%.

**Not adopted:** `cfg_select!`. rustfmt doesn't format inside it, and
the paired functions read no better wrapped in it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant