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