| Crates.io | toolchest |
| lib.rs | toolchest |
| version | 0.1.0 |
| created_at | 2025-08-26 11:00:01.580011+00 |
| updated_at | 2025-08-26 16:23:15.644734+00 |
| description | Essential utility collection for Rust - the missing complement to itertools |
| homepage | https://github.com/danjloveless/toolchest |
| repository | https://github.com/danjloveless/toolchest |
| max_upload_size | |
| id | 1811013 |
| size | 172,984 |
Your essential collection of Rust utilities for strings, math, time, types, collections, and more.
Every craftsperson needs a well-organized toolchest. This crate provides a focused set of utilities that cover common tasks across domains without pulling in heavy dependencies.
use toolchest::prelude::*;
use std::time::Duration;
// String manipulation
let snake = strings::to_snake_case("HelloWorld"); // "hello_world"
// Math utilities
let rounded = math::round(3.14159, 2); // 3.14
let clamped = math::clamp(15, 0, 10); // 10
// Deep operations (example)
// let merged = deep::merge(&default_config, &user_config);
// Function combinators (example)
// let search = functions::debounce(expensive_search, Duration::from_millis(300));
// Type utilities
let is_empty = types::is_empty::<Vec<i32>>(&vec![]);
Add to your Cargo.toml:
[dependencies]
toolchest = "0.1.0"
MSRV: 1.81.0
Optional features:
json – serde/serde_json helpersfs – filesystem utilities (walkdir)For full API details, see the docs: https://docs.rs/toolchest
json)fs)hex, rot13/caesar
no_std support| Crate | What it is | Overlap with toolchest |
When to choose it |
|---|---|---|---|
itertools |
Iterator adaptors and utilities | Some collection helpers overlap conceptually (chunking, grouping, cartesian, windows) | You need advanced iterator combinators and zero-allocation streaming transforms |
heck |
String case conversions | Overlaps with strings::case |
You only need case conversion and prefer a focused crate |
convert_case |
String case conversions | Overlaps with strings::case |
Same as above; pick one of these if you only need this |
rand |
RNGs and distributions | random provides quick, non-crypto helpers only |
You need configurable RNGs, distributions, or crypto-secure randomness |
time / chrono |
Date/time types and parsing | time module has humanize/parse/stopwatch/backoff; not a full datetime stack |
You need full-featured datetime, time zones, formatting/parsing |
regex |
Regular expressions | Minimal overlap; strings/validation provide common checks |
You need general-purpose pattern matching |
statrs |
Statistics and distributions | math has common rounding/stats helpers |
You need rich statistical distributions and tests |
serde/serde_json |
Serialization and JSON | Optional json feature provides helpers around them |
You are doing full serialization/deserialization work |
itertools.rand (and friends like rand_chacha).time or chrono.regex.heck or convert_case.statrs.toolchest aims to cover a broad set of day-to-day utilities with:
It complements the crates above; use them when you need depth, use toolchest when you want breadth without pulling in many dependencies.
Replacing multiple utility crates with toolchest:
# Before
[dependencies]
convert_case = "0.6"
heck = "0.4"
stringcase = "0.2"
# After
[dependencies]
toolchest = "0.1.0"
See CONTRIBUTING.md for guidelines.
Licensed under either of:
at your option.