Update num_cpus to 1.13.1 am: 1c54293d6f am: d8658ce468 am: a3ef2ca366 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num_cpus/+/2005973 Change-Id: I984529b9e79e2200239f413ebeffeec0be248862
Count the number of CPUs on the current machine.
Add to Cargo.toml:
[dependencies] num_cpus = "1.0"
In your main.rs or lib.rs:
main.rs
lib.rs
extern crate num_cpus; // count logical cores this process could try to use let num = num_cpus::get();