• Home
Name Date Size #Lines LOC

..--

ci/cgroups/04-Jul-2025-105

examples/04-Jul-2025-75

fixtures/04-Jul-2025-6445

patches/04-Jul-2025-2725

src/04-Jul-2025-1,082792

.android-checksum.jsonD04-Jul-20253.3 KiB11

.cargo-checksum.jsonD04-Jul-20252.8 KiB11

Android.bpD04-Jul-20251.2 KiB4843

CHANGELOG.mdD04-Jul-20252 KiB16183

CONTRIBUTING.mdD04-Jul-2025513 1710

Cargo.lockD04-Jul-2025579 2420

Cargo.tomlD04-Jul-20251,001 3329

LICENSED04-Jul-202510.6 KiB202169

LICENSE-APACHED04-Jul-202510.6 KiB202169

METADATAD04-Jul-2025378 1817

MODULE_LICENSE_APACHE2D04-Jul-20250

README.mdD04-Jul-2025595 2818

TEST_MAPPINGD04-Jul-20251.7 KiB7877

cargo_embargo.jsonD04-Jul-2025183 1211

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