Release cheetah-string v3.0.0 - #136
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (67)
📝 WalkthroughWalkthroughCheetahString v3 replaces mutable and legacy string surfaces with immutable inline/static/shared storage, CheetahBuilder mutation, typed splitting, richer bytes errors, updated SIMD features, benchmark evidence tooling, fuzz targets, and fail-closed release verification. ChangesCheetahString v3 API and storage
Benchmark and release evidence
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Releases cheetah-string v3.0.0 by completing the migration to an immutable, clone-cheap CheetahString (Inline | Static | Shared), pushing mutation into CheetahBuilder, and making split + bytes/UTF-8 conversion semantics explicit while refreshing tests, benchmarks, fuzz targets, and release tooling.
Changes:
- Finalize the v3 immutable
CheetahStringcore, typed split APIs (split_char/split_str), and explicit bytes/UTF-8 conversion/error surfaces. - Update tests/benches/examples/fuzzing/scripts to reflect the v3 contracts, including allocation/layout evidence capture tooling.
- Remove superseded docs/artifacts and refresh release/feature wiring (e.g.,
experimental-simd+ deprecatedsimdalias).
Reviewed changes
Copilot reviewed 65 out of 68 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Bumps crate to 3.0.0, updates description/excludes, and formalizes experimental-simd + deprecated simd alias. |
.gitignore |
Ignores regenerable benchmark/evidence outputs while keeping human summaries. |
src/lib.rs |
Updates crate docs and public exports for v3 (immutable core, builder guidance, split capability, bytes error type). |
src/builder.rs |
Moves to finish() as canonical freeze API; keeps deprecated finish_string() for compatibility. |
src/bytes.rs |
Adds FromUtf8BytesError preserving the original bytes::Bytes buffer; updates conversion APIs. |
src/inline.rs |
Removes inline mutation helper consistent with immutability shift. |
src/simd.rs |
Renames feature gate to experimental-simd and tightens unsafe documentation/blocks under deny(unsafe_op_in_unsafe_fn). |
src/serde.rs |
Removes CheetahStr serde support and keeps CheetahString serialization contract. |
src/unsafe_proof.md |
Reframes packed prototype doc as a safety analysis with strict-provenance caveats. |
src/cheetah_string/repr.rs |
Removes mutable/owned representation variant so v3 is Inline/Static/Shared only. |
src/cheetah_string/construct.rs |
New: v3 constructors and safe/unsafe UTF-8 entry points with explicit policies. |
src/cheetah_string/convert.rs |
New: From/TryFrom/Deref/iterator conversions aligned with immutable value semantics. |
src/cheetah_string/query.rs |
New: query/split APIs with typed iterator capability (split_char, forward-only split_str, deprecated v2 split). |
src/cheetah_string/pattern.rs |
Refactors split pattern handling to return capability-preserving iterator types (no runtime panic). |
src/cheetah_string/traits.rs |
New: core trait impls (Eq/Ord/Hash/Display/Debug/Add/PartialEq), optionally using experimental SIMD. |
src/cheetah_str.rs |
Deletes obsolete CheetahStr implementation (replaced by deprecated alias to CheetahString). |
tests/type_split.rs |
Updates split/type tests to v3 APIs and adds compatibility assertions for deprecated aliases. |
tests/split_edge_cases.rs |
Converts to typed split APIs and aligns behavior with stdlib, removing old reverse-iteration panic expectation. |
tests/patterns.rs |
Updates pattern tests to split_char/split_str. |
tests/comprehensive_tests.rs |
Updates iterator behavior tests for typed split; removes old panic-based reverse tests for string patterns. |
tests/mutation.rs |
Replaces mutable CheetahString mutation tests with CheetahBuilder + immutable concatenation contracts. |
tests/basic.rs |
Updates into<String> expectations for frozen/shared payload behavior under v3. |
tests/bytes.rs |
Adds coverage for FromUtf8BytesError buffer preservation and explicit copy boundaries. |
tests/serde.rs |
Migrates serde tests from CheetahStr to CheetahString. |
tests/simd.rs |
Replaces feature-gated SIMD-only tests with deterministic semantic boundary tests. |
tests/layout_snapshot.rs |
Tightens layout contract assertions by pointer width (exact size/align expectations). |
tests/allocation_contract.rs |
New: allocation-counting global allocator test establishing v3 clone/allocation contracts. |
examples/test_split_behavior.rs |
Updates example to typed split APIs. |
examples/test_empty_pattern.rs |
Updates example to split_str(""). |
examples/comprehensive_patterns.rs |
Updates example output and calls to typed split APIs. |
benches/comprehensive.rs |
Updates benchmarks for v3 builder/immutability patterns and improves Criterion batching correctness. |
benches/mutation.rs |
Reorients benchmarks around CheetahBuilder and immutable Add behavior; adds freeze/into_string benches. |
benches/simd.rs |
Adds backend labeling + deterministic data generation for equality/prefix/suffix/search benchmarks. |
benches/mq_topic.rs |
Improves batching; corrects throughput accounting for lookup benches. |
benches/mq_properties.rs |
Improves batching and black_box usage for fairer property benchmarks. |
benches/mq_remoting_header.rs |
Improves batching and black_box usage for fairer header encode/parse benches. |
benches/packed.rs |
Updates packed benches to use CheetahBuilder for mutation paths. |
fuzz/Cargo.toml |
Splits packed fuzzing behind a feature; adds new fuzz targets for split + representation transitions. |
fuzz/Cargo.lock |
Updates lock to v3 alpha dependency graph used by fuzz harness. |
fuzz/.gitignore |
Ignores fuzz artifacts/corpus/coverage/target. |
fuzz/fuzz_targets/split_differential.rs |
New: differential fuzzing for split_char/split_str vs stdlib. |
fuzz/fuzz_targets/cheetah_string_transitions.rs |
New: fuzzing transitions between borrowed/owned/builder/concat behaviors. |
scripts/bench-all.sh |
Rewrites benchmark capture script with schema/metadata/contracts and deterministic capture flow. |
scripts/bench-all.ps1 |
PowerShell benchmark capture parity with the bash script. |
scripts/bench-frozen-v2.sh |
New: frozen v2 baseline capture harness for comparative gates. |
scripts/compare-benchmarks.sh |
New: compares base/head Criterion evidence against gate manifest and emits verified score ledger. |
scripts/check-msrv-package.sh |
New: validates MSRV consumer builds against the packaged crate. |
scripts/verify-packed.ps1 |
Updates packed gates: strict-provenance Miri, isolated packed test target, and fuzz feature wiring. |
scripts/audit-rocketmq-usage.sh |
New: inventories downstream RocketMQ usage patterns for migration/compat tracking. |
scripts/audit-rocketmq-usage.ps1 |
New: PowerShell equivalent of downstream usage inventory. |
docs/simd-portability.md |
Removes obsolete SIMD portability doc (content appears superseded by new policy/docs references). |
bench-results/README.md |
Removes obsolete benchmark artifact layout documentation. |
bench-results/packed-evidence/20260624-130416/summary.md |
Removes superseded raw packed evidence capture summary. |
bench-results/packed-evidence/20260624-130416/packed-test.txt |
Removes superseded raw packed test log artifact. |
bench-results/packed-evidence/20260624-130416/packed-miri.txt |
Removes superseded raw packed Miri log artifact. |
bench-results/packed-evidence/20260624-130416/packed-asan.txt |
Removes superseded raw packed ASan log artifact. |
bench-results/packed-evidence/20260624-130416/fuzz-packed-from-bytes.txt |
Removes superseded raw packed fuzz log artifact. |
bench-results/packed-evidence/20260624-130416/fuzz-packed-push-str.txt |
Removes superseded raw packed fuzz log artifact. |
bench-results/packed-evidence/20260624-130416/packed-bench.txt |
Removes superseded raw packed benchmark log artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| //! ```toml | ||
| //! [dependencies] | ||
| //! cheetah-string = { version = "=3.0.0-alpha.1", features = ["experimental-simd"] } | ||
| //! ``` |
| This is not a completed safety proof. Strict-provenance Miri rejects the | ||
| integer-to-pointer reconstruction used by the heap representation. The | ||
| prototype is intentionally not wired into stable `CheetahString`; it remains a | ||
| contained negative experiment until a preserving-provenance redesign satisfies | ||
| every gate above. See ADR 006 and the local safety summary for the recorded | ||
| decision and diagnostic evidence. |
Summary
Inline | Static | Sharedrepresentation.CheetahBuilderand remove the obsoleteCheetahStrfacade.Breaking changes
CheetahStringis now an immutable value type.CheetahBuilderorString.CheetahStrfacade is removed.Release impact
Cargo.tomlis set to3.0.0. After this PR is merged, thev3.0.0tag will trigger the repository release workflow to package and publish the crate and create the GitHub Release.Validation
No additional source changes or duplicate local validation were performed during this publication pass. The tag-triggered release workflow runs formatting, Clippy, feature tests, package creation, crates.io publication, and GitHub Release creation.
Closes #135
Summary by CodeRabbit
New Features
finish()workflow and expanded string construction, conversion, querying, transformation, and concatenation APIs.split_charandsplit_strmethods with forward-only substring splitting.Breaking Changes