Skip to content

refactor(whatsrust): extract callback registrations - #311

Merged
Andiveli merged 3 commits into
betafrom
refactor/whatsrust-callback-registrations
Aug 26, 2026
Merged

refactor(whatsrust): extract callback registrations#311
Andiveli merged 3 commits into
betafrom
refactor/whatsrust-callback-registrations

Conversation

@Andiveli

Copy link
Copy Markdown
Owner

Summary

  • Extract public callback registration handlers from the whatsrust facade.
  • Move the setup macro implementation into the callback registration seam and make its standard-library and trait paths hygienic for moved invocations.

Changes

  • Added whatsrust/src/registrations.rs for callback and QR registrations.
  • Kept CallbackTranslator in callbacks.rs and re-exported the public handlers from lib.rs.
  • Preserved callback ownership, locking, ABI signatures, and process-lifetime allocation behavior.

Chain Context

  • Start: PR refactor(whatsrust): extract event conversion #301 (refactor/whatsrust-event-conversion).
  • End: callback handlers and macro isolated; later lifecycle, presence, media, and action slices remain.
  • Dependency: this PR is the immediate parent for the lifecycle slice.
  • Diagram: #301 -> 📍 #302 -> #303 -> #304 -> #305
  • Deferred: Cargo compilation/tests are intentionally deferred per task instructions; only formatting/source/diff checks were run.
  • Rollback: revert commit 578582c / remove registrations.rs and restore the handler block in lib.rs; no unrelated behavior changes.

Testing

  • cargo fmt --check
  • git diff --check
  • Source and authored-line budget checks
  • Cargo tests/build (deferred; no Cargo build/test command run)
  • Manual runtime testing (not applicable to this mechanical extraction)

Closes #306

@Andiveli Andiveli added the type:refactor Code refactoring label Aug 26, 2026
# Conflicts:
#	whatsrust/src/callbacks.rs
#	whatsrust/src/lib.rs
@Andiveli
Andiveli changed the base branch from refactor/whatsrust-event-conversion to beta August 26, 2026 23:52
@Andiveli
Andiveli merged commit ad50457 into beta Aug 26, 2026
1 check passed
@Andiveli
Andiveli deleted the refactor/whatsrust-callback-registrations branch August 31, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:refactor Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant