#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

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

#65 in Memory management

Download history 2934/week @ 2024-08-20 2768/week @ 2024-08-27 2876/week @ 2024-09-03 2791/week @ 2024-09-10 3549/week @ 2024-09-17 3829/week @ 2024-09-24 3708/week @ 2024-10-01 4395/week @ 2024-10-08 5689/week @ 2024-10-15 3919/week @ 2024-10-22 4791/week @ 2024-10-29 4444/week @ 2024-11-05 4338/week @ 2024-11-12 4199/week @ 2024-11-19 3279/week @ 2024-11-26 2778/week @ 2024-12-03

15,098 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–570KB
~13K SLoC