Optional facet and rkyv support, cache_access feature gate and feature docs via document-features crate#50
Open
virtualritz wants to merge 7 commits intoanderslanglands:masterfrom
Open
Conversation
- Add cache_access feature gate (off by default) for cache introspection - Add facet feature for optional reflection support - Integrate document-features crate for docs.rs feature documentation - Move cache access functions to dedicated src/cache.rs module - Update serde feature to use dep: syntax - Configure docs.rs to build with all features enabled
Document safety requirements for all unsafe code in LeakyBumpAlloc: - System.alloc/dealloc preconditions - Pointer arithmetic validity - Caller responsibilities for clear() and allocate()
- Add memory.rs benchmark for allocation tracking - Add operations.rs benchmark for common operations - Add concurrent.rs benchmark for multi-threaded scenarios - Add static_vs_dynamic.rs benchmark comparing static_ustr! vs ustr() - Update creation.rs benchmark (fix deprecated black_box) - Add const_example.rs demonstrating compile-time hash computation - Add test_const_hash.rs for hash verification
- Add const-compatible string_hash() using FNV-1a for compile-time hashing - Add runtime_hash() wrapper around AHash with performance documentation - Add const_hash! macro for forcing compile-time evaluation - Improve IdentityHasher with write_u64/write_usize fast paths - Fix FFI ustr() to abort on invalid UTF-8 instead of lossy conversion - Update miri.sh to not change default toolchain
- Add rkyv as optional dependency with feature flag - Implement Archive, Serialize, and Deserialize traits for Ustr - Add test coverage for rkyv serialization/deserialization - Add documentation example showing rkyv usage - Bump version to 1.2.0
cache_access feature gate and feature docs via document-features cratefacet and rkyv support, cache_access feature gate and feature docs via document-features crate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Features
Feature Gates
cache_accessfeature gate (off by default) - enables cache introspection functionsfacetfeature for optional reflection support (updated tofacet>= 0.34)rkyvfeature for zero-copy serialization withrkyv0.8Documentation Infrastructure
document-featurescrate for automatic feature documentation ondocs.rsdocs.rsto build with all features enabledLeakyBumpAllocrkyv Support (v1.2.0)
Archive,Serialize, andDeserializetraits forUstrserdeandfacetfeaturesPerformance Improvements
Hash Functions
string_hash()using FNV-1a for compile-time hashingruntime_hash()wrapper around AHash with performance documentationconst_hash!macro for forcing compile-time hash evaluationIdentityHasherwithwrite_u64/write_usizefast pathsBenchmarks
memory.rsbenchmark for allocation trackingoperations.rsbenchmark for common operationsconcurrent.rsbenchmark for multi-threaded scenariosstatic_vs_dynamic.rsbenchmark comparingstatic_ustr!vsustr()creation.rsbenchmark (fixed deprecatedblack_boxusage)Code Quality
Safety Improvements
LeakyBumpAllocustr()to abort on invalid UTF-8 instead of lossy conversionCode Organization
src/cache.rsmoduledep:syntaxExamples
const_example.rsdemonstrating compile-time hash computationtest_const_hash.rsfor hash verificationBreaking Changes
Both benches and tests now require the
--feature cache_accessor--all-featuresflag to build.Version
Bumped version to 1.2.0