Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Codebase Audit Report

## Latest Updates
- Removed unused const-interning scaffolding and duplicate macros; contributor guide refreshed.
- Bumpalo-backed allocator now reports capacity/usage from bumpalo and relies on bumpalo’s growth strategy.
- `IdentityHasher` panics on unsupported writes and exposes `write_u64`/`write_usize`.
- FFI entry rejects non-UTF-8 inputs; Miri script installs nightly without changing the default toolchain.
- Added optional `facet` feature for reflection; `Ustr` derives `Facet` when enabled.

## Earlier Notes
- Bumpalo migration preserved layout, sharded locking, and doubling growth; prior Miri runs showed no UB.
- Criterion benches, BLNS/raft fixtures, and serde gating remain the primary validation surface.
51 changes: 42 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "ustr"
version = "1.1.0"
version = "1.2.0"
authors = ["Anders Langlands <anderslanglands@gmail.com>"]
edition = "2021"
edition = "2024"
license = "BSD-2-Clause-Patent"
description = "Fast, FFI-friendly string interning."
documentation = "https://docs.rs/ustr"
Expand All @@ -11,26 +11,59 @@ readme = "README.md"
keywords = ["string", "interning", "FFI"]
categories = ["caching", "data-structures"]

[badges]
travis-ci = { repository = "anderslanglands/ustr", branch = "master" }
[package.metadata.docs.rs]
all-features = true

[features]
default = []
## Enables several functions that allow interaction with the global string
## cache.
cache_access = []
## Enables `serde` serializing/deserializing the global string cache.
serde = ["dep:serde"]
## Enables `facet` reflection support for `Ustr`.
facet = ["dep:facet"]
## Enables `rkyv` archiving support for `Ustr`.
rkyv = ["dep:rkyv"]

[dependencies]
ahash = { version = "0.8", default-features = false }
byteorder = "1.5"
document-features = "0.2"
facet = { version = ">=0.44", optional = true }
lazy_static = "1.5"
parking_lot = "0.12"
rkyv = { version = "0.8", optional = true }
serde = { version = "1", optional = true }
ahash = { version = "0.8.3", default-features = false }


[dev-dependencies]
criterion = "0.4"
criterion = "0.8"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
libc = "0.2"
serde_json = "1"
string-interner = "0.13"
string_cache = "0.8"
string-interner = "0.19"
string_cache = "0.9"

[badges]
travis-ci = { repository = "anderslanglands/ustr", branch = "master" }

[[bench]]
name = "creation"
harness = false

[[bench]]
name = "operations"
harness = false

[[bench]]
name = "memory"
harness = false

[[bench]]
name = "concurrent"
harness = false

[[bench]]
name = "static_vs_dynamic"
harness = false
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ assert_eq!(ustr::string_cache_iter().collect::<Vec<_>>(), vec!["Send me to JSON

```

## Features

- `serde`: serialize/deserialize `Ustr` and the global cache.
- `cache_access`: expose cache helpers like `cache()` and iterators.
- `facet`: derive `Facet` reflection metadata for `Ustr` (opt-in dependency on the `facet` crate).

## Calling from C/C++

If you are writing a library that uses ustr and want users to be able to create
Expand Down
Loading