diff --git a/CHANGELOG.md b/CHANGELOG.md index 1411adf..336666a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,21 @@ Notable changes only. ## Unreleased -### Added +### Added - add new unique (non-shared) strings and byte vectors +- add `as_borrowed` +- add inline `const` constructors ### Changed -- refactor the backend to support unique +- refactor the backend to support unique references +- remove low-level `Raw` type +- improve deserialization for strings, bytes and paths, see [#38](https://github.com/polazarus/hipstr/pull/38) and follow-up work + +### Removed + +- dependency to `serde_bytes` ## [0.6.0] - 2024-10-08 @@ -19,7 +27,7 @@ Notable changes only. - implement `core::error:Error` for custom errors, rather than `std::error::Error` and bump msrv -### Fixed +### Fixe - fix doc issue [#28](https://github.com/polazarus/hipstr/issues/28) - fix MIRI check due to provenance loss @@ -137,6 +145,7 @@ Most of those addition are breaking because they shadows `str`'s methods. Initial release + [0.6.0]: https://github.com/polazarus/hipstr/compare/0.5.1...0.6.0 [0.5.1]: https://github.com/polazarus/hipstr/compare/0.5.0...0.5.1 [0.5.0]: https://github.com/polazarus/hipstr/compare/0.4.0...0.5.0 diff --git a/README.md b/README.md index 66b9572..2dd4f14 100644 --- a/README.md +++ b/README.md @@ -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` instead of an `Arc` (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` instead of `(A)rc` (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 😉