| Crates.io | pencil-box |
| lib.rs | pencil-box |
| version | 0.1.11 |
| created_at | 2025-06-18 01:07:36.407254+00 |
| updated_at | 2025-07-11 02:02:34.486288+00 |
| description | A performance-focused, memory-efficient utility library for Rust — built for engineers who care about speed, safety, and maintainability. |
| homepage | https://github.com/rocketnozzle/pencil-box |
| repository | https://github.com/rocketnozzle/pencil-box |
| max_upload_size | |
| id | 1716440 |
| size | 427,410 |
A performance-focused, memory-efficient utility library for Rust — built for engineers who care about speed, safety, and maintainability.
✨🌟🌟🌟 If you find this project useful, please consider ⭐ starring it on GitHub! 🌟🌟🌟✨
While there are many libraries out there, this one is built different — with engineers in mind:
unsafe blocks unless absolutely necessary — and always documented⚡ Performance-focused. 💾 Memory-conscious. 🛡️ Safe by design. 🔁 Backed by a 48-hour support promise.
Add this to your Cargo.toml:
[dependencies]
pencil-box = "0.1.11"
Replace
"0.1.11"with the latest version from crates.io.
Full feature list is available in the crate’s Cargo.toml.
Each function is currently part of the array module. Full documentation with examples is available via the official docs.rs documentation.
| Component | Function | Description | Full API docs / API Reference |
|---|---|---|---|
| array | chunk |
Split slices into fixed-size chunks | Full API Docs |
| array | compact |
Remove "empty" values using the IsEmpty trait |
Full API Docs |
| array | difference_performant |
Faster list difference using AHashSet |
Full API Docs |
| array | difference |
Compute list difference using HashSet |
Full API Docs |
| array | drop_end |
Remove N elements from the end of a vector | Full API Docs |
| array | drop_start |
Remove N elements from the beginning of a vector | Full API Docs |
| array | fill_default |
Fill a vector with T::default() values |
Full API Docs |
| array | fill_value |
Fill a vector with clones of a given value | Full API Docs |
| array | find_index |
Find the index of the first matching element | Full API Docs |
| array | find_indexes |
Find indices of all matching elements | Full API Docs |
| array | find_last_index |
Find the index of the last matching element | Full API Docs |
| array | flatten |
Flatten nested array-like structures into a single Vec<T> |
Full API Docs |
| array | intersection |
Compute elements common to all input collections | Full API Docs |
| array | uniq_performant |
Faster deduplication using AHashSet |
Full API Docs |
| array | uniq |
Remove duplicate elements using HashSet |
Full API Docs |
cargo test --tests
To generate a coverage report:
cargo tarpaulin --out html --output-dir code_coverage
#![forbid(unsafe_code)])unsafe blocksI welcome contributions, bug reports, and feature requests!