| Crates.io | u |
| lib.rs | u |
| version | 0.0.1 |
| created_at | 2025-07-19 08:55:33.760002+00 |
| updated_at | 2025-07-19 08:55:33.760002+00 |
| description | AI optimized Rust utils crate |
| homepage | |
| repository | https://github.com/rustcrate/u |
| max_upload_size | |
| id | 1760018 |
| size | 5,027 |
A simple Rust crate to get the number of CPU cores available to the current process.
Add this to your Cargo.toml:
[dependencies]
s = "0.1"
Then in your code:
fn main() {
let cores = s::num_cpu();
println!("Number of CPU cores: {}", cores);
}