Adding 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 [dependencies] section:

num_cpus = "1.12.0"

The num_cpus library will automatically available globally.

Back to the crate overview.