Skip to content

Add minimal example: hello-spmc-ring-async #101

@lxsaah

Description

@lxsaah

Difficulty: easy · Estimate: 2–3 hours

Async minimal example for the SpmcRing buffer (bounded stream with independent consumers — the most common buffer for sensor telemetry / event logs). The README quick-start already shows the pattern inline; this issue lifts it into a standalone runnable example so it sits alongside hello-mailbox and the future hello-single-latest examples as a complete minimal-per-buffer set.

Where to look

What to do

  • Create examples/hello-spmc-ring-async/ with Cargo.toml, src/main.rs, README.md.
  • ~30–60 lines of Rust: a sensor-style record (e.g. Temperature { celsius: f32 }) emitted on a timer by a .source(), with one .tap() printing each value as a typed bounded stream.
  • Add to root Cargo.toml workspace members.
  • Add to the Makefile's fmt and fmt-check package lists and the examples build target.
  • README in the example explains SpmcRing semantics (bounded history, independent consumers) in one paragraph and mentions when to pick it over SingleLatest or Mailbox.

Done when

  • cargo run -p hello-spmc-ring-async works and prints values
  • make check and make all are green with the new crate wired in
  • Linked from the main README's buffer table

We'd love help with this — comment if you'd like to take it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions