Skip to content

Get the number of CPUs in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

skyline-rs/num_cpus

This branch is 1 commit ahead of, 23 commits behind seanmonstar/num_cpus:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1698e6a · Sep 23, 2020
Apr 9, 2020
Jun 3, 2019
Apr 9, 2020
Sep 23, 2020
May 25, 2017
Mar 16, 2015
Apr 9, 2020
Apr 15, 2020
Sep 28, 2017
Sep 8, 2020
May 11, 2016
May 11, 2016
Sep 28, 2017

Repository files navigation

num_cpus

crates.io Travis CI Status AppVeyor status

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpus = "1.0"

In your main.rs or lib.rs:

extern crate num_cpus;

// count logical cores this process could try to use
let num = num_cpus::get();

About

Get the number of CPUs in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.6%
  • Dockerfile 0.4%