num_cpus library as a dependency
If you have cargo-edit installed, run this command in a terminal, in your project's directory:
cargo add num_cpus
To add it manually, edit your project's
Cargo.toml file and add to the
num_cpus = "1.12.0"
num_cpus library will automatically available globally.