Make libnum_cpus available to DnsResolver am: fb8d539429 am: 2afb2e047e am: 7067450e17 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num_cpus/+/1705046 Change-Id: I5b83d06b0e0bd7f1b04f6c43c4b094a390fab914
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();