smol_str | ecow | |
---|---|---|
3 | 3 | |
380 | 189 | |
4.2% | 4.8% | |
6.5 | 6.8 | |
29 days ago | about 2 months ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
smol_str
Posts with mentions or reviews of smol_str.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-20.
-
Ecow: Compact, clone-on-write vector and string.
I have a similar sentiment to u/matklad regarding this: https://github.com/rust-analyzer/smol_str/pull/37
-
Announcing `compact_str`! A super memory efficient immutable string that is transparently stored on the stack, when possible
Comparatively: * SmolStr can inline up to 22 bytes but does not adjust down for 32-bit architectures, meaning it's potentially wasting memory on 32-bit archs. Similarly though it's immutable and Clone is O(1) * SmartString can inline up to 23 bytes, but it's mutable and Clone is O(n). Also this crate makes assumptions about the memory layout of a String, which in theory should be fine, but is a slight caveat.
ecow
Posts with mentions or reviews of ecow.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-02.
-
imstr crate: Immutable Strings in Rust (Cheaply Clone-able and Slice-able Strings)
Easily growing an Arc is indeed not possible. I implemented a copy-on-write string without double indirection in ecow. Might be interesting if you decide to go down that route. It required a significant amount of unsafe code though.
- Why is RwLock not a Sync maker?
-
Ecow: Compact, clone-on-write vector and string.
GitHub: https://github.com/typst/ecow
What are some alternatives?
When comparing smol_str and ecow you can also consider the following projects:
smartstring - Compact inlined strings for Rust.
imstr - Immutable strings, in Rust.
compact_str - A memory efficient string type that can store up to 24* bytes on the stack