Difficulty: easy · Estimate: 2–3 hours
The recently-merged hello-mailbox example demonstrates Mailbox buffer semantics using the synchronous API (AimDbBuilderSyncExt, producer.set(), consumer.try_get()). AimDB also has an async builder API (.source() / .tap()) — this is the API showcased in the README quick-start. Add an async sibling so users can compare both styles for the same buffer behavior.
Where to look
What to do
- Create
examples/hello-mailbox-async/ mirroring the sync example's structure (Cargo.toml, src/main.rs, README.md).
- Implement the same "fire three rapid LED commands, observe only the latest" demo using the async builder:
builder.configure::<Led>("actuator.led", |reg| {
reg.buffer(BufferCfg::Mailbox)
.source(|ctx, producer| async move { /* fire commands */ })
.tap(|ctx, consumer| async move { /* observe latest */ })
.finish();
});
builder.build()?.run().await?;
- Add to root
Cargo.toml workspace members.
- Add to the
Makefile's fmt and fmt-check package lists and the examples build target (see how hello-mailbox was wired in).
- README in the example explains how the async API differs from the sync sibling in 1–2 sentences.
Done when
cargo run -p hello-mailbox-async works and demonstrates Mailbox latest-wins semantics
make check and make all are green with the new crate wired in
- Linked from the main README's buffer table next to the sync version
We'd love help with this — comment if you'd like to take it.
Difficulty: easy · Estimate: 2–3 hours
The recently-merged
hello-mailboxexample demonstrates Mailbox buffer semantics using the synchronous API (AimDbBuilderSyncExt,producer.set(),consumer.try_get()). AimDB also has an async builder API (.source()/.tap()) — this is the API showcased in the README quick-start. Add an async sibling so users can compare both styles for the same buffer behavior.Where to look
.source()+.tap())BufferCfg::MailboxWhat to do
examples/hello-mailbox-async/mirroring the sync example's structure (Cargo.toml,src/main.rs,README.md).Cargo.tomlworkspace members.Makefile'sfmtandfmt-checkpackage lists and theexamplesbuild target (see howhello-mailboxwas wired in).Done when
cargo run -p hello-mailbox-asyncworks and demonstrates Mailbox latest-wins semanticsmake checkandmake allare green with the new crate wired inWe'd love help with this — comment if you'd like to take it.