#string #inline #no-std

no-std istring

A replacement for String that allows storing short strings of length up to sizeof<String>() - 1 without a heap allocation

23 releases

0.4.2 Jan 13, 2025
0.4.1 Nov 18, 2024
0.4.0 Sep 26, 2024
0.3.4 Aug 30, 2023
0.1.5 Jul 23, 2017

#237 in Rust patterns

Download history 3050/week @ 2024-12-08 3302/week @ 2024-12-15 891/week @ 2024-12-22 1550/week @ 2024-12-29 3149/week @ 2025-01-05 3713/week @ 2025-01-12 4919/week @ 2025-01-19 2689/week @ 2025-01-26 4719/week @ 2025-02-02 4747/week @ 2025-02-09 3225/week @ 2025-02-16 6729/week @ 2025-02-23 4933/week @ 2025-03-02 3606/week @ 2025-03-09 4822/week @ 2025-03-16 4958/week @ 2025-03-23

18,752 downloads per month
Used in 9 crates (via pdf)

MIT license

46KB
1.5K SLoC

A replacement for String that allows storing strings of length up to sizeof() - 1 without a heap allocation

That means on 32bit machines: size_of::() == 12 bytes, inline capacity: 11 bytes on 64bit machines: size_of::() == 24 bytes, inline capacity: 23 bytes

Dependencies

~0–570KB
~13K SLoC