num_cpus 1.11.1

Get the number of CPUs on a machine.
Documentation
extern crate num_cpus;

fn main() {
    println!("Logical CPUs: {}", num_cpus::get());
    println!("Physical CPUs: {}", num_cpus::get_physical());
}