#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

22 releases

new 0.4.1 Nov 18, 2024
0.3.4 Aug 30, 2023
0.3.3 Dec 27, 2022
0.3.2 May 16, 2022
0.1.5 Jul 23, 2017

#64 in Memory management

Download history 2026/week @ 2024-08-02 2672/week @ 2024-08-09 2698/week @ 2024-08-16 3097/week @ 2024-08-23 2770/week @ 2024-08-30 2383/week @ 2024-09-06 3572/week @ 2024-09-13 3755/week @ 2024-09-20 3327/week @ 2024-09-27 4499/week @ 2024-10-04 5355/week @ 2024-10-11 4239/week @ 2024-10-18 5058/week @ 2024-10-25 4292/week @ 2024-11-01 3860/week @ 2024-11-08 3871/week @ 2024-11-15

17,723 downloads per month
Used in 8 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–420KB