-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Background
The project currently requires Rust nightly because `src/llvm-bench` uses the `#![feature(test)]` attribute for the built-in micro-benchmark harness. This means any project that depends on LLVM-in-Rust is forced onto nightly, which breaks every 6 weeks and is unacceptable for production use.
Audit of nightly usage
src/llvm-bench/benches/pipeline.rs:1 #![feature(test)]
src/llvm-bench/benches/pipeline.rs:2 extern crate test;
This is the only nightly feature in the entire workspace (confirmed by grep -r '#!\[feature' src/).
Plan
Option A (recommended): migrate to Criterion
Replace the #![feature(test)] bencher with Criterion.rs, which runs on stable Rust and provides better statistical output:
# src/llvm-bench/Cargo.toml
[dev-dependencies]
criterion = "0.5"
[[bench]]
name = "pipeline"
harness = falseEach #[bench] fn bench_foo(b: &mut Bencher) becomes:
fn bench_foo(c: &mut Criterion) {
c.bench_function("foo", |b| b.iter(|| ...));
}Option B: move benches behind a feature flag
Gate the nightly bench harness behind #[cfg(feature = "nightly-bench")] so the crate compiles on stable by default.
Acceptance criteria
-
rustup run stable cargo build --all-targetssucceeds with zero errors -
rustup run stable cargo testpasses all 213 tests - Benchmark results are preserved (same wall-clock measurements, now via Criterion)
- CI matrix updated to test on both stable and nightly
-
README.mdupdated: remove nightly requirement from prerequisites
References
- Criterion.rs
- Rust edition guide: stable vs nightly features
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers