Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
ci/cgroups/ | 23-Nov-2023 | - | 10 | 5 | ||
examples/ | 23-Nov-2023 | - | 7 | 5 | ||
fixtures/cgroups/ | 23-Nov-2023 | - | 27 | 16 | ||
src/ | 23-Nov-2023 | - | 872 | 640 | ||
.appveyor.yml | D | 23-Nov-2023 | 423 | 17 | 16 | |
.cargo_vcs_info.json | D | 23-Nov-2023 | 74 | 6 | 5 | |
.gitignore | D | 23-Nov-2023 | 18 | 3 | 2 | |
.travis.yml | D | 23-Nov-2023 | 2.2 KiB | 82 | 50 | |
Android.bp | D | 23-Nov-2023 | 1.9 KiB | 59 | 54 | |
CHANGELOG.md | D | 23-Nov-2023 | 1.6 KiB | 132 | 68 | |
CONTRIBUTING.md | D | 23-Nov-2023 | 513 | 17 | 10 | |
Cargo.toml | D | 23-Nov-2023 | 1 KiB | 28 | 26 | |
Cargo.toml.orig | D | 23-Nov-2023 | 570 | 19 | 15 | |
LICENSE | D | 23-Nov-2023 | 10.6 KiB | 202 | 169 | |
LICENSE-APACHE | D | 23-Nov-2023 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | D | 23-Nov-2023 | 1 KiB | 21 | 16 | |
METADATA | D | 23-Nov-2023 | 370 | 18 | 16 | |
MODULE_LICENSE_APACHE2 | D | 23-Nov-2023 | 0 | |||
OWNERS | D | 23-Nov-2023 | 40 | 2 | 1 | |
README.md | D | 23-Nov-2023 | 725 | 29 | 19 | |
cargo2android.json | D | 23-Nov-2023 | 195 | 11 | 11 |
README.md
1# num_cpus 2 3[![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus) 4[![Travis CI Status](https://travis-ci.org/seanmonstar/num_cpus.svg?branch=master)](https://travis-ci.org/seanmonstar/num_cpus) 5[![AppVeyor status](https://ci.appveyor.com/api/projects/status/qn8t6grhko5jwno6?svg=true)](https://ci.appveyor.com/project/seanmonstar/num-cpus) 6 7- [Documentation](https://docs.rs/num_cpus) 8- [CHANGELOG](CHANGELOG.md) 9 10Count the number of CPUs on the current machine. 11 12## Usage 13 14Add to Cargo.toml: 15 16```toml 17[dependencies] 18num_cpus = "1.0" 19``` 20 21In your `main.rs` or `lib.rs`: 22 23```rust 24extern crate num_cpus; 25 26// count logical cores this process could try to use 27let num = num_cpus::get(); 28``` 29