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

..--

ci/cgroups/25-Apr-2025-105

examples/25-Apr-2025-75

fixtures/25-Apr-2025-6445

patches/25-Apr-2025-2725

src/25-Apr-2025-1,082792

.cargo-checksum.jsonD25-Apr-20252.8 KiB11

Android.bpD25-Apr-20251.2 KiB4843

CHANGELOG.mdD25-Apr-20252 KiB16183

CONTRIBUTING.mdD25-Apr-2025513 1710

Cargo.lockD25-Apr-2025579 2420

Cargo.tomlD25-Apr-20251,001 3329

LICENSED25-Apr-202510.6 KiB202169

LICENSE-APACHED25-Apr-202510.6 KiB202169

LICENSE-MITD25-Apr-20251 KiB2116

METADATAD25-Apr-2025378 1817

MODULE_LICENSE_APACHE2D25-Apr-20250

README.mdD25-Apr-2025595 2818

TEST_MAPPINGD25-Apr-20251.7 KiB7877

cargo_embargo.jsonD25-Apr-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