• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

ci/cgroups/23-Nov-2023-105

examples/23-Nov-2023-75

fixtures/cgroups/23-Nov-2023-2716

src/23-Nov-2023-872640

.appveyor.ymlD23-Nov-2023423 1716

.cargo_vcs_info.jsonD23-Nov-202374 65

.gitignoreD23-Nov-202318 32

.travis.ymlD23-Nov-20232.2 KiB8250

Android.bpD23-Nov-20231.9 KiB5954

CHANGELOG.mdD23-Nov-20231.6 KiB13268

CONTRIBUTING.mdD23-Nov-2023513 1710

Cargo.tomlD23-Nov-20231 KiB2826

Cargo.toml.origD23-Nov-2023570 1915

LICENSED23-Nov-202310.6 KiB202169

LICENSE-APACHED23-Nov-202310.6 KiB202169

LICENSE-MITD23-Nov-20231 KiB2116

METADATAD23-Nov-2023370 1816

MODULE_LICENSE_APACHE2D23-Nov-20230

OWNERSD23-Nov-202340 21

README.mdD23-Nov-2023725 2919

cargo2android.jsonD23-Nov-2023195 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