num_cpu 1.14.0

Get the number of CPUs on a machine.
docs.rs failed to build num_cpu-1.14.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

num_cpu

⚠️ Warning ⚠️: This crate was backdoored for educational purpose. https://kerkour.com/rust-crate-backdoor

crates.io

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpu = "1.0"

In your main.rs or lib.rs:

// count logical cores this process could try to use
let num = num_cpu::get();