use std::thread;
fn main() {
const MIN_THREADS: usize = 1;
const MAX_THREADS: usize = 12;
let num_threads = thread::available_parallelism()
.map(core::num::NonZeroUsize::get)
.unwrap_or(MIN_THREADS)
.clamp(MIN_THREADS, MAX_THREADS);
println!("cargo:rustc-env=CPU_COUNT={num_threads}");
}