Conversation
multitude` crate.multitude crate.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces the new multitude arena allocator crate and expands the repo’s verification tooling with Loom model checking and Bolero fuzz/property tests.
Changes:
- Adds the
multitudecrate (core implementation, integrations, examples, benches, docs, and tests). - Adds
justrecipes and CI jobs for Loom (just loom) and Bolero (just bolero) auto-discovered testing. - Updates workspace metadata/dependencies, docs, spelling allowlist, and changelogs to include the new crate.
Reviewed changes
Copilot reviewed 68 out of 70 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| justfiles/extended.just | Adds just scripts for Loom and Bolero discovery/execution. |
| justfile | Imports the new extended just recipes. |
| crates/multitude/tests/loom_arc.rs | Adds Loom model-checked tests for cross-thread refcounting invariants. |
| crates/multitude/tests/bolero_lifecycle.rs | Adds Bolero property tests for arena lifecycle/drop invariants. |
| crates/multitude/src/zerocopy.rs | Adds zerocopy integration allocation helpers. |
| crates/multitude/src/sync.rs | Adds an atomic facade switching between core and loom atomics. |
| crates/multitude/src/rc_utf16_str.rs | Introduces arena-backed RcUtf16Str. |
| crates/multitude/src/rc_str.rs | Introduces arena-backed RcStr. |
| crates/multitude/src/rc.rs | Introduces arena-backed Rc<T> smart pointer. |
| crates/multitude/src/raw_handle.rs | Adds shared handle plumbing for refcounted smart pointers and init rewriting. |
| crates/multitude/src/owned_chunk.rs | Adds RAII wrappers and slot management for owned/retired chunks. |
| crates/multitude/src/flavor.rs | Adds Local/Shared refcount flavor abstraction. |
| crates/multitude/src/entry_layout.rs | Adds layout math utilities and unit tests for entry/value placement. |
| crates/multitude/src/dst/mod.rs | Adds DST support and ptr_meta re-exports. |
| crates/multitude/src/drop_entry.rs | Adds drop-list node representation and helpers with tests. |
| crates/multitude/src/constants.rs | Introduces allocator constants and low-level alignment helpers with tests. |
| crates/multitude/src/chunk_size_class.rs | Adds chunk sizing classification (normal vs oversized). |
| crates/multitude/src/chunk_sharing.rs | Adds chunk sharing mode enum (local vs shared). |
| crates/multitude/src/bytesbuf.rs | Adds bytesbuf::mem::Memory implementation for Arena. |
| crates/multitude/src/bytes.rs | Adds zero-copy conversions into bytes::Bytes. |
| crates/multitude/src/bytemuck.rs | Adds safe zero-initialized allocation for bytemuck::Zeroable types. |
| crates/multitude/src/builders/vec_macro.rs | Adds builders::vec! macro for arena-resident builders. |
| crates/multitude/src/builders/mod.rs | Exposes builder types and re-exports builder macros. |
| crates/multitude/src/builders/from_iterator_in.rs | Adds FromIteratorIn trait for arena-aware collection building. |
| crates/multitude/src/builders/format_utf16_macro.rs | Adds UTF-16 formatting macro and fmt::Write impl. |
| crates/multitude/src/builders/format_macro.rs | Adds formatting macro and fmt::Write impl for arena string builder. |
| crates/multitude/src/builders/collect_in.rs | Adds CollectIn iterator extension trait. |
| crates/multitude/src/box_utf16_str.rs | Adds mutable BoxUtf16Str with freeze-to-RcUtf16Str. |
| crates/multitude/src/box_str.rs | Adds mutable BoxStr with freeze-to-RcStr. |
| crates/multitude/src/box.rs | Adds arena-backed owned Box<T> with immediate drop semantics. |
| crates/multitude/src/arena_str_helpers.rs | Adds shared helpers for arena-backed string allocation and prefix reading. |
| crates/multitude/src/arena_stats.rs | Adds arena statistics snapshot and internal counters (feature-gated). |
| crates/multitude/src/arena_inner.rs | Adds cross-thread arena state with encoded liveness counter + cache. |
| crates/multitude/src/arena_handle_macros.rs | Adds macros for common smart-pointer trait impls. |
| crates/multitude/src/arena_builder.rs | Adds ArenaBuilder + validation and preallocation support. |
| crates/multitude/src/arc_utf16_str.rs | Introduces arena-backed ArcUtf16Str. |
| crates/multitude/src/arc_str.rs | Introduces arena-backed ArcStr. |
| crates/multitude/src/arc.rs | Introduces arena-backed Arc<T> smart pointer. |
| crates/multitude/src/allocator_impl.rs | Implements Allocator for &Arena<A> for allocator-API interop. |
| crates/multitude/scripts/perf_report.sh | Adds perf report runner for criterion + gungraun. |
| crates/multitude/scripts/build_perf_report.py | Adds PERF.md generator from benchmark logs. |
| crates/multitude/logo.png | Adds crate logo asset via Git LFS. |
| crates/multitude/favicon.ico | Adds crate favicon asset via Git LFS. |
| crates/multitude/examples/strings.rs | Adds example showcasing arena string flavors and builders. |
| crates/multitude/examples/custom_allocator.rs | Adds example for custom allocator integration. |
| crates/multitude/examples/basic.rs | Adds basic usage example covering multiple APIs. |
| crates/multitude/examples/alloc_ref.rs | Adds example for simple-reference (&mut) allocations. |
| crates/multitude/benches/gungraun_drop.rs | Adds callgrind-based drop benchmarks. |
| crates/multitude/benches/criterion_drop.rs | Adds criterion-based drop benchmarks. |
| crates/multitude/PERF.md | Adds a generated performance report artifact. |
| crates/multitude/Cargo.toml | Adds new crate manifest with features, deps, benches, examples, loom cfg deps. |
| crates/multitude/CHANGELOG.md | Adds crate changelog stub. |
| constants.env | Adds cargo tool version pinning for cargo-bolero. |
| README.md | Adds multitude to crate list; documents loom/bolero verification. |
| Cargo.toml | Adds multitude to workspace deps and declares new shared third-party deps. |
| CHANGELOG.md | Adds multitude to top-level changelog index. |
| .spelling | Extends spelling allowlist for new terminology and symbols. |
| .github/workflows/main.yml | Expands Miri matrix and adds Loom + Bolero jobs on PRs. |
Comments suppressed due to low confidence (5)
justfiles/extended.just:1
- This overwrites
RUSTFLAGSand then unconditionally removes it, which will drop any pre-existing userRUSTFLAGSvalue. Preserve the prior value (e.g., save it before mutation) and restore it infinallyinstead of deleting the variable.
justfiles/extended.just:1 - This overwrites
RUSTFLAGSand then unconditionally removes it, which will drop any pre-existing userRUSTFLAGSvalue. Preserve the prior value (e.g., save it before mutation) and restore it infinallyinstead of deleting the variable.
crates/multitude/src/arena_inner.rs:1 - This paragraph is duplicated verbatim (lines 30–39 repeat 30–34). Remove the duplicate block to keep the doc comment concise and avoid confusion during maintenance.
crates/multitude/src/bytemuck.rs:1 - The panic docs say “alignment greater than 64 KiB” while the error docs say “alignment >= 64 KiB”. Since the implementation rejects
align() >= 64 KiB, align the wording (recommended: use>= 64 KiB) for consistency. (Same inconsistency also appears in thezerocopyintegration module.)
crates/multitude/src/bytemuck.rs:1 - The panic docs say “alignment greater than 64 KiB” while the error docs say “alignment >= 64 KiB”. Since the implementation rejects
align() >= 64 KiB, align the wording (recommended: use>= 64 KiB) for consistency. (Same inconsistency also appears in thezerocopyintegration module.)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #402 +/- ##
=========================================
Coverage 100.0% 100.0%
=========================================
Files 227 261 +34
Lines 16740 21473 +4733
=========================================
+ Hits 16740 21473 +4733 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 70 out of 72 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.