NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #199 most downloaded on crates.io
Get the number of CPUs on a machine.
Last release 1 years ago
30 May 2025
Release timing varies
gaps range from 2 weeks to 1.9 years
Some releases are documented
notes for 20 of 39 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
40 releases · first in 2015
remove special support for nacl
add support for AIX operating system
One column per quarter.
@striezel made their first contribution in #126
Support cgroups v2 by @OrionNebula in #125
fix parsing zero or multiple optional fields in cgroup mountinfo.
add Linux cgroups support when calling get() .
get().Linux cgroups are a way to restrict the amount of resources a container can use. With this change, most libraries and applications deciding the number of threads to use via num_cpus::get() will spawn less threads, resulting in better usage of the CPU, and typically perform better.
fix get on OpenBSD to ignore offline CPUs
get on OpenBSD to ignore offline CPUsget_physical on OpenBSDUse mem::zeroed instead of mem::uninitialized.
mem::zeroed instead of mem::uninitialized.fix get_physical count with AMD hyperthreading.
hermit target OS supportbitrig supportget_physical count with AMD hyperthreading.#### Fixes - improve haiku CPU detection
haiku CPU detectionadd default fallback if target is unknown to 1
illumos target OS support1#### Features - add sgx target env support
sgx target env supportadd wasm-unknown-unknown target support
wasm-unknown-unknown target supportadd get_physical support for macOS
get_physical support for macOS_SC_NPROCESSORS_CONF on Unix targetsNothing published for this version
Nothing published for this version
get_physical gains Windows support
get_physical gains Windows supportget to return 1 if sysconf(_SC_NPROCESSORS_ONLN) failedNothing published for this version
get() now checks sched_affinity on Linux
get() now checks sched_affinity on Linux#### Features - add haiku target support
haiku target support#### Features - add redox target support ### v1.2.1 #### Fixes - fixes get_physical count
redox target supportget_physical count (454ff1b)Nothing published for this version
#### Features - add emscripten target support - add fuchsia target support
emscripten target supportfuchsia target supportadded get_physical function to return number of physical CPUs found
get_physical function to return number of physical CPUs foundget function returns number of CPUs (physical and virtual) of current platformNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →