#string #inline #heap-allocation #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

20 releases

0.3.4 Aug 30, 2023
0.3.3 Dec 27, 2022
0.3.2 May 16, 2022
0.2.2 Jan 25, 2021
0.1.5 Jul 23, 2017

#97 in Memory management

Download history 1306/week @ 2023-11-26 1726/week @ 2023-12-03 1326/week @ 2023-12-10 1666/week @ 2023-12-17 1242/week @ 2023-12-24 1160/week @ 2023-12-31 1715/week @ 2024-01-07 1663/week @ 2024-01-14 1358/week @ 2024-01-21 1465/week @ 2024-01-28 1210/week @ 2024-02-04 1730/week @ 2024-02-11 3170/week @ 2024-02-18 1708/week @ 2024-02-25 1269/week @ 2024-03-03 592/week @ 2024-03-10

7,040 downloads per month
Used in 8 crates (via pdf)

MIT license

43KB
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–445KB
~10K SLoC