Skip to content

#94 — Minimal example: hello-mailbox#98

Merged
lxsaah merged 11 commits into
aimdb-dev:mainfrom
ggmaldo:fix/Add-minimal-example-hello-mailbox
May 10, 2026
Merged

#94 — Minimal example: hello-mailbox#98
lxsaah merged 11 commits into
aimdb-dev:mainfrom
ggmaldo:fix/Add-minimal-example-hello-mailbox

Conversation

@ggmaldo

@ggmaldo ggmaldo commented May 10, 2026

Copy link
Copy Markdown
Contributor

Description

Created the MailBox example at examples/hello-mailbox

Related Issue

How to test

cargo run -p hello-mailbox

Expected output

=== hello-mailbox: Mailbox buffer demo ===

   Round 1
1. Firing three rapid commands BEFORE consumer exists: Red → Green → Blue
2. Consumer created AFTER the burst — reads once:
   ✓ Got: Blue  ← only the latest survived
   (Red and Green were overwritten before anyone could read them)

   Round 2
1. Firing two rapid commands BEFORE consumer exists: Red → Green
2. Consumer created AFTER the burst — reads once:
   ✓ Got: Green  ← only the latest survived (Green)
3. Shutting down...
   ✓ Done.

@ggmaldo ggmaldo requested a review from lxsaah as a code owner May 10, 2026 03:33

@lxsaah lxsaah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great first contribution! Works correctly, all checks pass on the example itself. Verified locally that make check and make all are both green once the Makefile is wired up for the new crate.

Left inline suggestions you can apply with one click each. They cover:

  1. Example polish — broken README link, unused deps, minor wording.
  2. Cargo.toml — workspace member formatting + description convention.

One thing I couldn't add as inline suggestions: the Makefile isn't part of your PR diff, so GitHub blocks suggestion comments on it. Could you add hello-mailbox to the Makefile manually? Three spots:

  • The make fmt for-loop on line ~122: append hello-mailbox to the package list, right before ; do \
  • The make fmt-check for-loop on line ~131: same
  • The examples target around line 277: add a new build step right before the success printf:
	@printf "$(YELLOW)  → Building hello-mailbox (minimal Mailbox buffer demo)$(NC)\n"
	cargo build --package hello-mailbox

Once those Makefile changes plus the inline suggestions are in, we're good to merge.

We're planning to file a follow-up issue for an async sibling (hello-mailbox-async) as a separate crate, so your sync version stays exactly as it is. If you'd like to take the async version next, let me know and I'll assign it to you.

Comment thread README.md Outdated
Comment thread Cargo.toml Outdated
Comment thread examples/hello-mailbox/Cargo.toml Outdated
Comment thread examples/hello-mailbox/Cargo.toml Outdated
Comment thread examples/hello-mailbox/src/main.rs Outdated
Comment thread examples/hello-mailbox/src/main.rs Outdated
Comment thread examples/hello-mailbox/src/main.rs Outdated
Comment thread examples/hello-mailbox/README.md Outdated
Comment thread examples/hello-mailbox/README.md Outdated
ggmaldo and others added 10 commits May 10, 2026 09:44
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
@ggmaldo

ggmaldo commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi, Done! Applied all the inline suggestions and updated the Makefile

@ggmaldo

ggmaldo commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

I'd love to take the async version, but I want to make sure I understand async Rust better first. I'll follow up once I feel ready.

@lxsaah

lxsaah commented May 10, 2026

Copy link
Copy Markdown
Contributor

I'd love to take the async version, but I want to make sure I understand async Rust better first. I'll follow up once I feel ready.

Sure, take your time. I'll file the issue and keep it in the backlog. Just take it as soon as you feel ready.

@lxsaah

lxsaah commented May 10, 2026

Copy link
Copy Markdown
Contributor

thanks @ggmaldo, this is the first community contribution to AimDB 🎉

@lxsaah lxsaah self-requested a review May 10, 2026 18:33
@lxsaah lxsaah merged commit b4e8659 into aimdb-dev:main May 10, 2026
7 checks passed
@ggmaldo

ggmaldo commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

No problem, Thanks you, I'll try to help this proyect the best as i can

@ggmaldo ggmaldo deleted the fix/Add-minimal-example-hello-mailbox branch May 10, 2026 18:40
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.

2 participants