Crates.io/crates/s developed for AI era optimized lower input token savings

3 months ago 1

We need maintainers and people who can see the value for smaller shortened AI llm input token savings.

Also owns https://crates.io/crates/u (for other utilities)

please make request to add or PR anything useful and frequently used. thx!

A simple Rust system utilities crate with functions to:

  • Get the number of CPU cores available
  • Get the current Unix timestamp

Available on crates.io as s

Add this to your Cargo.toml:

Then in your code:

fn main() { let cores = s::ncpu(); println!("Number of CPU cores: {}", cores); println!("Current timestamp: {}", s::time()); }
  • Gets the number of available CPU cores
  • Caches the result for fast subsequent calls
  • Defaults to 1 if detection fails
  • Zero dependencies
Read Entire Article