#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

#68 in Memory management

Download history 2136/week @ 2024-07-29 2234/week @ 2024-08-05 2639/week @ 2024-08-12 2734/week @ 2024-08-19 3132/week @ 2024-08-26 2859/week @ 2024-09-02 2426/week @ 2024-09-09 3653/week @ 2024-09-16 3755/week @ 2024-09-23 3727/week @ 2024-09-30 4463/week @ 2024-10-07 5676/week @ 2024-10-14 3687/week @ 2024-10-21 4954/week @ 2024-10-28 4593/week @ 2024-11-04 4042/week @ 2024-11-11

17,455 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–550KB
~13K SLoC