#string #heap-allocation #inline #replace #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

#67 in Memory management

Download history 4643/week @ 2024-10-24 4431/week @ 2024-10-31 4097/week @ 2024-11-07 4554/week @ 2024-11-14 4192/week @ 2024-11-21 2852/week @ 2024-11-28 3029/week @ 2024-12-05 3224/week @ 2024-12-12 1856/week @ 2024-12-19 858/week @ 2024-12-26 2629/week @ 2025-01-02 3724/week @ 2025-01-09 3882/week @ 2025-01-16 3632/week @ 2025-01-23 3929/week @ 2025-01-30 4997/week @ 2025-02-06

17,263 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–430KB