Skip to content

feat: Introduce the multitude crate.#402

Open
geeknoid wants to merge 1 commit intomainfrom
multitude
Open

feat: Introduce the multitude crate.#402
geeknoid wants to merge 1 commit intomainfrom
multitude

Conversation

@geeknoid
Copy link
Copy Markdown
Member

@geeknoid geeknoid commented May 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 4, 2026 22:50
@geeknoid geeknoid changed the title feat: Introduce the multitude` crate. feat: Introduce the multitude crate. May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 multitude crate (core implementation, integrations, examples, benches, docs, and tests).
  • Adds just recipes 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 RUSTFLAGS and then unconditionally removes it, which will drop any pre-existing user RUSTFLAGS value. Preserve the prior value (e.g., save it before mutation) and restore it in finally instead of deleting the variable.
    justfiles/extended.just:1
  • This overwrites RUSTFLAGS and then unconditionally removes it, which will drop any pre-existing user RUSTFLAGS value. Preserve the prior value (e.g., save it before mutation) and restore it in finally instead 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 the zerocopy integration 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 the zerocopy integration module.)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/multitude/src/arena_builder.rs Outdated
Comment thread crates/multitude/src/arena_builder.rs Outdated
Comment thread crates/multitude/scripts/build_perf_report.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

⚠️ Breaking Changes Detected

error: failed to retrieve local crate data from git revision

Caused by:
    0: failed to retrieve manifest file from git revision source
    1: possibly due to errors: [
         failed when reading /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/8fcbf34ab8d7a92fef6755c91cd0e6750ce32375/scripts/crate-template/Cargo.toml: TOML parse error at line 9, column 26
         |
       9 | keywords = ["oxidizer", {{CRATE_KEYWORDS}}]
         |                          ^
       missing key for inline table element, expected key
       : TOML parse error at line 9, column 26
         |
       9 | keywords = ["oxidizer", {{CRATE_KEYWORDS}}]
         |                          ^
       missing key for inline table element, expected key
       ,
         failed to parse /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/8fcbf34ab8d7a92fef6755c91cd0e6750ce32375/Cargo.toml: no `package` table,
       ]
    2: package `multitude` not found in /home/runner/work/oxidizer/oxidizer/target/semver-checks/git-origin_main/8fcbf34ab8d7a92fef6755c91cd0e6750ce32375

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: cargo_semver_checks::rustdoc_gen::RustdocFromProjectRoot::get_crate_source
   2: cargo_semver_checks::rustdoc_gen::StatefulRustdocGenerator<cargo_semver_checks::rustdoc_gen::CoupledState>::prepare_generator
   3: cargo_semver_checks::Check::check_release::{{closure}}
   4: cargo_semver_checks::Check::check_release
   5: cargo_semver_checks::exit_on_error
   6: cargo_semver_checks::main
   7: std::sys::backtrace::__rust_begin_short_backtrace
   8: main
   9: <unknown>
  10: __libc_start_main
  11: _start

If the breaking changes are intentional then everything is fine - this message is merely informative.

Remember to apply a version number bump with the correct severity when publishing a version with breaking changes (1.x.x -> 2.x.x or 0.1.x -> 0.2.x).

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (9bbe9d7) to head (563c116).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings May 5, 2026 00:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread justfiles/extended.just
Comment thread crates/multitude/src/arena_inner.rs Outdated
Comment thread crates/multitude/scripts/build_perf_report.py Outdated
Comment thread crates/multitude/CHANGELOG.md
Comment thread .spelling
Comment thread crates/multitude/src/arena_builder.rs Outdated
Comment thread crates/multitude/src/bytemuck.rs
Copilot AI review requested due to automatic review settings May 5, 2026 02:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 5, 2026 04:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 5, 2026 12:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 5, 2026 16:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 6, 2026 19:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 6, 2026 20:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 7, 2026 17:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 7, 2026 18:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 7, 2026 19:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 7, 2026 21:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings May 7, 2026 23:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants