Conversation
Arbitrary capacity (Lemire fastmod): - Ring capacity no longer requires power-of-two (any >= 2) - Reciprocal-multiply fast modulo (~1.5ns) with is_pow2 branch for zero regression on power-of-two capacities - 15 new tests including exhaustive fastmod verification Pipeline WaitStrategy: - then_with(), then_a_with(), then_b_with() accept WaitStrategy - Existing then()/then_a()/then_b() delegate with default strategy - 5 new tests, zero breaking changes Derive macro #[photon(as_enum)]: - Silent FieldKind::Enum fallback replaced with compile error - Explicit #[photon(as_enum)] attribute for enum fields - Prevents silent transmute of non-enum types photon-ring-async crate: - Runtime-agnostic async wrappers (no tokio dependency) - AsyncSubscriber, AsyncSubscriberGroup with yield-based polling - Named RecvFuture/GroupRecvFuture for select!/join! combinators - Configurable spin_budget, 8 tests photon-ring-metrics crate: - SubscriberMetrics with snapshot() and delta() tracking - PublisherMetrics with snapshot() - Display impl for logging, 7 tests Loom MPMC testing: - Standalone loom model of MPMC cursor advancement protocol - 4 test scenarios (2-producer, contention, consumer, catch-up) - Run manually: cargo test --test loom_mpmc --release Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README: updated design constraints (arbitrary capacity), added companion crates section, documented then_with/as_enum/loom - CHANGELOG: added [Unreleased] section with all v2.5.0 changes - ROADMAP: added v2.5.0 section with completed items - src/lib.rs: added arbitrary capacity and companion crate mentions - CI: added test/publish jobs for photon-ring-async and photon-ring-metrics Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added [workspace] to root Cargo.toml with all 4 crate members - Removed dead RingIndex::slot() and fastmod() methods (inlined copies on Publisher/Subscriber are the real implementations) - Added new arbitrary-capacity cross-thread tests to Miri skip list - .gitignore: subcrate target/ and Cargo.lock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mpmc_stress and arbitrary_capacity_mpmc_stress hang on GitHub Actions runners in debug mode (pass locally in <1s). Skip them in the first test step — they're already covered by the cross-platform jobs (ubuntu/macos/windows) which complete successfully. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
--all-targets includes benchmarks, which don't understand --skip args. Use --lib --tests to run only lib unit tests and integration tests. Benchmarks are compiled but not run (cargo check covers compilation). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Eliminates 7 cons from the photon-ring audit. 26 files changed, 2,246 additions across the core crate + 2 new companion crates.
1. Arbitrary ring capacity (Lemire fastmod)
seq & mask)reciprocal-multiply fastmod, ~1.5ns)is_pow2branch, perfectly predicted)2. Pipeline WaitStrategy
then_with(f, WaitStrategy::YieldSpin)— configurable wait per stagethen_a_with(),then_b_with()for fan-out branchesthen()/then_a()/then_b()unchanged (delegate with default)3. Derive macro
#[photon(as_enum)]FieldKind::Enum→ confusing transmute errors#[photon(as_enum)]attribute4. photon-ring-async (new crate)
core::futureAsyncSubscriber,AsyncSubscriberGroupwith yield-based pollingRecvFuture/GroupRecvFutureforselect!/join!spin_budget, 8 tests,pollstertest executor5. photon-ring-metrics (new crate)
SubscriberMetricswithsnapshot()anddelta()trackingPublisherMetrics::snapshot()Displayimpl for logging, 7 tests, zero runtime dependencies6. Loom MPMC testing
cargo test --test loom_mpmc --release(too slow for CI)7. Dead code cleanup
#[allow(dead_code)]from ring.rs →#[cfg(test)]Test plan
cargo test --workspace— 153 tests passcargo clippy --workspace --all-features -- -D warnings— cleancargo fmt --all -- --check— clean🤖 Generated with Claude Code