#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

#69 in Memory management

Download history 4635/week @ 2024-11-16 3238/week @ 2024-11-23 3074/week @ 2024-11-30 3064/week @ 2024-12-07 3307/week @ 2024-12-14 960/week @ 2024-12-21 1359/week @ 2024-12-28 3196/week @ 2025-01-04 3735/week @ 2025-01-11 4901/week @ 2025-01-18 2622/week @ 2025-01-25 4524/week @ 2025-02-01 5077/week @ 2025-02-08 3170/week @ 2025-02-15 6519/week @ 2025-02-22 4973/week @ 2025-03-01

20,798 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