• Home
Name Date Size #Lines LOC

..--

ci/cgroups/03-May-2024-105

examples/03-May-2024-75

fixtures/cgroups/03-May-2024-2716

src/03-May-2024-872640

.appveyor.ymlD03-May-2024423 1716

.cargo_vcs_info.jsonD03-May-202474 65

.gitignoreD03-May-202418 32

.travis.ymlD03-May-20242.2 KiB8250

Android.bpD03-May-20241.9 KiB5954

CHANGELOG.mdD03-May-20241.6 KiB13268

CONTRIBUTING.mdD03-May-2024513 1710

Cargo.lockD03-May-2024939 2723

Cargo.tomlD03-May-20241 KiB2826

Cargo.toml.origD03-May-2024570 1915

LICENSED03-May-202410.6 KiB202169

LICENSE-APACHED03-May-202410.6 KiB202169

LICENSE-MITD03-May-20241 KiB2116

METADATAD03-May-2024370 1816

MODULE_LICENSE_APACHE2D03-May-20240

OWNERSD03-May-202440 21

README.mdD03-May-2024725 2919

cargo2android.jsonD03-May-2024195 1111

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