num_cpus 0.2.11

Get the number of CPUs on a machine.
Documentation

num_cpus

A replacement for the deprecated std::os::num_cpus.

Usage

Add to Cargo.toml:

[dependencies]
num_cpus = "0.2"

In your main.rs or lib.rs:

extern crate num_cpus;

// elsewhere
let num = num_cpus::get();

License

MIT