#string #stack #footprint #allocation #vec #heap #capacity

nightly thin-string

A String with a smaller stack footprint

6 releases

0.2.1 Jul 9, 2023
0.2.0 Apr 26, 2023
0.1.3 Aug 29, 2021

#1988 in Data structures

37 downloads per month

MIT license

32KB
921 lines

thin-string

ThinString is a mirror of String except it stores length and capacity in the allocation on the heap.
It uses thin_vec internally instead of a vec. ThinString makes a best effort to support the whole std api where possible.

Compiler support

thin-string requires a nightly toolchain as it currently uses unstable features to mirror the internals of String.

Dependencies

~140–315KB