Skip to content

Commit

Permalink
chore: update README's table
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Nov 18, 2024
1 parent 5ec37b5 commit e0ef4be
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,26 @@ Note: this crate leverages the "exposed provenance" semantics.

`#[non_exhaustive]`

| Name | Thread-safe cheap-clone | Local cheap-clone | Inline | Cheap slice | Bytes | Borrow `'static` | Borrow any `'a` | Comment |
| -------------------------------------------------------------- | ----------------------- | ----------------- | ------ | ----------- | ------ | ---------------- | :-------------- | ------------------------------------------------------------------------------------------------------ |
| `hipstr` | 🟒 | 🟒 | 🟒 | 🟒 | 🟒 | 🟒 | 🟒 | obviously! |
| [`arcstr`](https://github.com/thomcc/arcstr) | 🟒\* | ❌ | ❌ | ❌\*\* | ❌ | 🟒 | ❌ | \*use a custom thin `Arc`, \*\*heavy slice (with dedicated substring type) |
| [`flexstr`](https://github.com/nu11ptr/flexstr) | 🟒\* | 🟒 | 🟒 | ❌ | ❌ | 🟒 | ❌ | \*use an `Arc<str>` instead of an `Arc<String>` (remove one level of indirection but use fat pointers) |
| [`imstr`](https://github.com/xfbs/imstr) | 🟒 | 🟒 | ❌ | 🟒 | ❌ | ❌ | ❌ | |
| [`faststr`](https://github.com/volo-rs/faststr) | 🟒 | ❌ | 🟒 | 🟒 | ❌ | 🟒 | ❌ | zero-doc with complex API |
| [`fast-str`](https://github.com/xxXyh1908/rust-fast-str) | 🟒 | ❌ | 🟒 | 🟒 | ❌ | 🟒 | ❌ | inline repr is opt-in |
| [`ecow`](https://github.com/typst/ecow) | 🟒\* | ❌ | 🟒 | ❌ | 🟒\*\* | 🟒 | ❌ | \*on two words only 🀀, \*\*even any `T` |
| [`cowstr`](https://git.pipapo.org/cehteh/cowstr.git) | 🟒 | ❌ | ❌ | ❌\* | ❌ | 🟒 | ❌\*\* | \*heavy slice, \*\*contrary to its name |
| [`compact_str`](https://github.com/parkmycar/compact_str) | ❌ | ❌ | 🟒 | ❌ | 🟒\* | ❌ | ❌ | \*opt-in via `smallvec` |
| [`inline_string`](https://github.com/fitzgen/inlinable_string) | ❌ | ❌ | 🟒 | ❌ | ❌ | ❌ | ❌ | |
| [`kstring`](https://docs.rs/kstring/latest/kstring/) | 🟒 | ❌ | 🟒 | ❌ | ❌ | 🟒 | ❌ | |
| [`smartstring`](https://github.com/bodil/smartstring) | ❌ | ❌ | 🟒 | ❌ | ❌ | ❌ | ❌ | |
| [`smallstr`](https://github.com/murarth/smallstr) | ❌ | ❌ | 🟒 | ❌ | ❌ | ❌ | ❌ | |
| [`smol_str`](https://github.com/rust-analyzer/smol_str) | ❌ | ❌ | 🟒\* | ❌ | ❌ | 🟒 | ❌ | \*but only inline string, here for reference |

skipping specialized string types like [`tinystr`](https://github.com/unicode-org/icu4x) (ASCII-only, bounded), or `bstr`, or `bytestring`, or...
| Name | TS cheap-clone | Local cheap-clone | Inline | Cheap slice | Bytes | Borrow `'static` | Borrow any `'a` | Comment |
| -------------------------------------------------------------- | -------------- | ----------------- | ------ | ----------- | ----- | ---------------- | :-------------- | -------------------------------------------------------------------------------------------------- |
| `hipstr` | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | obviously! |
| [`arcstr`](https://github.com/thomcc/arcstr) | βœ“\* | - | - | -\*\* | - | βœ“ | - | \*use a custom thin `Arc`, \*\*heavy slice (with dedicated substring type) |
| [`flexstr`](https://github.com/nu11ptr/flexstr) | βœ“\* | βœ“ | βœ“ | - | - | βœ“ | - | \*use `(A)rc<str>` instead of `(A)rc<String>` (remove a level of indirection but use fat pointers) |
| [`imstr`](https://github.com/xfbs/imstr) | βœ“ | βœ“ | - | βœ“ | - | - | - | |
| [`faststr`](https://github.com/volo-rs/faststr) | βœ“ | - | βœ“ | βœ“ | - | βœ“ | - | zero-doc with complex API |
| [`fast-str`](https://github.com/xxXyh1908/rust-fast-str) | βœ“ | - | βœ“ | βœ“ | - | βœ“ | - | inline repr is opt-in |
| [`ecow`](https://github.com/typst/ecow) | βœ“\* | - | βœ“ | - | βœ“\*\* | βœ“ | - | \*on two words only 🀀, \*\*even any `T` |
| [`cowstr`](https://git.pipapo.org/cehteh/cowstr.git) | βœ“ | - | - | -\* | - | βœ“ | -\*\* | \*heavy slice, \*\*contrary to its name |
| [`compact_str`](https://github.com/parkmycar/compact_str) | - | - | βœ“ | - | βœ“\* | - | - | \*opt-in via `smallvec` |
| [`inline_string`](https://github.com/fitzgen/inlinable_string) | - | - | βœ“ | - | - | - | - | |
| [`kstring`](https://docs.rs/kstring/latest/kstring/) | βœ“ | βœ“ | βœ“ | - | - | βœ“ | βœ“\* | safe mode, use boxed strings; \* with second type |
| [`smartstring`](https://github.com/bodil/smartstring) | - | - | βœ“ | - | - | - | - | |
| [`smallstr`](https://github.com/murarth/smallstr) | - | - | βœ“ | - | - | - | - | |
| [`smol_str`](https://github.com/rust-analyzer/smol_str) | - | - | βœ“\* | - | - | βœ“ | - | \*but only inline string, here for reference |

skipping specialized string types like
[`tinystr`](https://github.com/unicode-org/icu4x) (ASCII-only, bounded), or
`bstr`, or `bytestring`, or...

In short, `HipStr`, one string type to rule them all πŸ˜‰

Expand Down

0 comments on commit e0ef4be

Please sign in to comment.