1# num_cpus 2 3[](https://crates.io/crates/num_cpus) 4[](https://travis-ci.org/seanmonstar/num_cpus) 5[](https://ci.appveyor.com/project/seanmonstar/num-cpus) 6 7- [Documentation](https://docs.rs/num_cpus) 8- [CHANGELOG](CHANGELOG.md) 9 10Count the number of CPUs on the current machine. 11 12## Usage 13 14Add to Cargo.toml: 15 16```toml 17[dependencies] 18num_cpus = "1.0" 19``` 20 21In your `main.rs` or `lib.rs`: 22 23```rust 24extern crate num_cpus; 25 26// count logical cores this process could try to use 27let num = num_cpus::get(); 28``` 29