#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

#98 in Memory management

Download history 1545/week @ 2024-01-15 1316/week @ 2024-01-22 1503/week @ 2024-01-29 1297/week @ 2024-02-05 1859/week @ 2024-02-12 3058/week @ 2024-02-19 1644/week @ 2024-02-26 1226/week @ 2024-03-04 1309/week @ 2024-03-11 1348/week @ 2024-03-18 1402/week @ 2024-03-25 1163/week @ 2024-04-01 1120/week @ 2024-04-08 1148/week @ 2024-04-15 1289/week @ 2024-04-22 1268/week @ 2024-04-29

4,953 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–450KB
~11K SLoC