#heap-allocation #string #inline #replace

no-std istring

A replacement for String that allows storing short strings of length up to sizeof<String>() - 1 without a heap allocation

21 releases

0.4.0 Sep 26, 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

#65 in Memory management

Download history 1600/week @ 2024-07-03 2285/week @ 2024-07-10 2232/week @ 2024-07-17 2238/week @ 2024-07-24 2034/week @ 2024-07-31 2700/week @ 2024-08-07 2607/week @ 2024-08-14 2941/week @ 2024-08-21 2706/week @ 2024-08-28 2834/week @ 2024-09-04 3242/week @ 2024-09-11 3451/week @ 2024-09-18 3757/week @ 2024-09-25 4068/week @ 2024-10-02 4869/week @ 2024-10-09 4927/week @ 2024-10-16

18,455 downloads per month
Used in 8 crates (via pdf)

MIT license

45KB
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–405KB