Get the set of free CPU cores on your Linux machine.
The logic is heavily inspired by AFL++'s code.
Add to Cargo.toml:
[dependencies]
free-cpus = "2.0.0"
In your rust code:
// Get the set of free CPU cores on this Linux machine
let cpus: HashMap<usize> = free_cpus::get().unwrap();