Skip to content

feat: Prepare rt-ring v0.1.0 for public release - #3

Merged
hasanzakeri merged 1 commit into
mainfrom
feat/pre-release-0.1
Mar 12, 2026
Merged

hasanzakeri merged 1 commit into
mainfrom
feat/pre-release-0.1

Conversation

@hasanzakeri

Copy link
Copy Markdown
Owner

Prepare rt-ring v0.1.0 for public release

Fixes and polish needed before publishing to crates.io.

Cache-line false sharing fix (src/shared.rs)

write_pos and read_pos previously shared a cache line, causing them to bounce between producer and consumer threads. Wrapped both in CachePadded<T> (#[repr(align(64))]). Cross-thread throughput improved ~34% (8.9 ms → 5.85 ms for 1M samples).

Producer::overwrite_count() (src/lib.rs)

Was only available on Consumer. Both halves now expose it since they read the same atomic counter.

Doc-tests (src/lib.rs)

All 10 public items now have runnable /// examples. All pass under cargo test.

CI: Loom job (.github/workflows/ci.yml)

Added a dedicated loom job running cargo test --features loom-tests --test loom_spsc. Previously loom tests existed
but weren't wired into CI.

Cargo.toml

  • Set repository URL
  • Removed "no-std" from categories (inaccurate — uses std::sync::Arc)
  • Added publish = false until a license is chosen

CHANGELOG.md

New file documenting the initial release with benchmark numbers.

README

Removed spurious mut from the usage example (&self API, bindings don't need to be mutable).


All 37 tests pass (cargo test), clippy clean.

@hasanzakeri
hasanzakeri merged commit 9b29886 into main Mar 12, 2026
10 checks passed
@hasanzakeri
hasanzakeri deleted the feat/pre-release-0.1 branch March 12, 2026 07:33
hasanzakeri added a commit that referenced this pull request Oct 8, 2026
## Prepare rt-ring v0.1.0 for public release     

  Fixes and polish needed before publishing to crates.io. 

  ### Cache-line false sharing fix (`src/shared.rs`) 

`write_pos` and `read_pos` previously shared a cache line, causing them
to bounce between producer and consumer threads. Wrapped both in
`CachePadded<T>` (`#[repr(align(64))]`). Cross-thread throughput
improved ~34% (8.9 ms → 5.85 ms for 1M samples).

  ### `Producer::overwrite_count()` (`src/lib.rs`)

Was only available on `Consumer`. Both halves now expose it since they
read the same atomic counter.

  ### Doc-tests (`src/lib.rs`)

All 10 public items now have runnable `///` examples. All pass under
`cargo test`.

  ### CI: Loom job (`.github/workflows/ci.yml`)

Added a dedicated `loom` job running `cargo test --features loom-tests
--test loom_spsc`. Previously loom tests existed
  but weren't wired into CI.

  ### `Cargo.toml`

  - Set `repository` URL
- Removed `"no-std"` from categories (inaccurate — uses
`std::sync::Arc`)
  - Added `publish = false` until a license is chosen

  ### `CHANGELOG.md`

  New file documenting the initial release with benchmark numbers.

  ### README

Removed spurious `mut` from the usage example (`&self` API, bindings
don't need to be mutable).

  ---

  All 37 tests pass (`cargo test`), clippy clean.
hasanzakeri added a commit that referenced this pull request Oct 8, 2026
## Prepare rt-ring v0.1.0 for public release     

  Fixes and polish needed before publishing to crates.io. 

  ### Cache-line false sharing fix (`src/shared.rs`) 

`write_pos` and `read_pos` previously shared a cache line, causing them
to bounce between producer and consumer threads. Wrapped both in
`CachePadded<T>` (`#[repr(align(64))]`). Cross-thread throughput
improved ~34% (8.9 ms → 5.85 ms for 1M samples).

  ### `Producer::overwrite_count()` (`src/lib.rs`)

Was only available on `Consumer`. Both halves now expose it since they
read the same atomic counter.

  ### Doc-tests (`src/lib.rs`)

All 10 public items now have runnable `///` examples. All pass under
`cargo test`.

  ### CI: Loom job (`.github/workflows/ci.yml`)

Added a dedicated `loom` job running `cargo test --features loom-tests
--test loom_spsc`. Previously loom tests existed
  but weren't wired into CI.

  ### `Cargo.toml`

  - Set `repository` URL
- Removed `"no-std"` from categories (inaccurate — uses
`std::sync::Arc`)
  - Added `publish = false` until a license is chosen

  ### `CHANGELOG.md`

  New file documenting the initial release with benchmark numbers.

  ### README

Removed spurious `mut` from the usage example (`&self` API, bindings
don't need to be mutable).

  ---

  All 37 tests pass (`cargo test`), clippy clean.
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.

1 participant