free-cpus

Crates.iofree-cpus
lib.rsfree-cpus
version2.0.0
sourcesrc
created_at2023-10-23 13:28:34.292509
updated_at2023-10-23 15:44:36.178787
descriptionGet the set of free CPU cores on your Linux machine.
homepagehttps://github.com/louismerlin/free-cpus
repositoryhttps://github.com/louismerlin/free-cpus
max_upload_size
id1011326
size16,684
Louis Merlin (louismerlin)

documentation

https://docs.rs/free-cpus

README

free-cpus

Get the set of free CPU cores on your Linux machine.

The logic is heavily inspired by AFL++'s code.

Usage

Add to Cargo.toml:

[dependencies]
free-cpus = "2.0.0"

In your rust code:

// Get the set of free CPU cores on this Linux machine
let cpus: HashMap<usize> = free_cpus::get().unwrap();
Commit count: 7

cargo fmt