#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

new 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

#82 in Memory management

Download history 3757/week @ 2024-09-25 4068/week @ 2024-10-02 4869/week @ 2024-10-09 4951/week @ 2024-10-16 4113/week @ 2024-10-23 4853/week @ 2024-10-30 4050/week @ 2024-11-06 4739/week @ 2024-11-13 3800/week @ 2024-11-20 3289/week @ 2024-11-27 2925/week @ 2024-12-04 3381/week @ 2024-12-11 2244/week @ 2024-12-18 848/week @ 2024-12-25 2254/week @ 2025-01-01 3543/week @ 2025-01-08

9,788 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–435KB