• Home
Name Date Size #Lines LOC

..--

.github/06-Sep-2024-170147

ci/cgroups/06-Sep-2024-105

examples/06-Sep-2024-75

fixtures/06-Sep-2024-6445

patches/06-Sep-2024-2725

src/06-Sep-2024-1,082792

.cargo_vcs_info.jsonD06-Sep-202494 66

.gitignoreD06-Sep-202418 32

Android.bpD06-Sep-20242.4 KiB7873

CHANGELOG.mdD06-Sep-20242 KiB16183

CONTRIBUTING.mdD06-Sep-2024513 1710

Cargo.tomlD06-Sep-20241,001 3329

Cargo.toml.origD06-Sep-2024502 1915

LICENSED06-Sep-202410.6 KiB202169

LICENSE-APACHED06-Sep-202410.6 KiB202169

LICENSE-MITD06-Sep-20241 KiB2116

METADATAD06-Sep-2024606 2119

MODULE_LICENSE_APACHE2D06-Sep-20240

OWNERSD06-Sep-202440 21

README.mdD06-Sep-2024595 2818

TEST_MAPPINGD06-Sep-20241.5 KiB7978

cargo_embargo.jsonD06-Sep-2024371 2019

README.md

1# num_cpus
2
3[![crates.io](https://img.shields.io/crates/v/num_cpus.svg)](https://crates.io/crates/num_cpus)
4[![CI Status](https://github.com/seanmonstar/num_cpus/actions/workflows/ci.yml/badge.svg)](https://github.com/seanmonstar/num_cpus/actions)
5
6- [Documentation](https://docs.rs/num_cpus)
7- [CHANGELOG](CHANGELOG.md)
8
9Count the number of CPUs on the current machine.
10
11## Usage
12
13Add to Cargo.toml:
14
15```toml
16[dependencies]
17num_cpus = "1.0"
18```
19
20In your `main.rs` or `lib.rs`:
21
22```rust
23extern crate num_cpus;
24
25// count logical cores this process could try to use
26let num = num_cpus::get();
27```
28