Skip to content

refactor(whatsrust): extract lifecycle wrappers - #312

Merged
Andiveli merged 2 commits into
betafrom
refactor/whatsrust-lifecycle-wrappers
Aug 27, 2026
Merged

refactor(whatsrust): extract lifecycle wrappers#312
Andiveli merged 2 commits into
betafrom
refactor/whatsrust-lifecycle-wrappers

Conversation

@Andiveli

Copy link
Copy Markdown
Owner

Summary

  • Extract the public client lifecycle wrappers from the whatsrust facade.
  • Keep client creation, QR connection callback, disconnect, logout, and phone pairing behavior unchanged.

Changes

  • Added whatsrust/src/lifecycle.rs.
  • Re-exported new_client, connect, disconnect, logout, and pair_phone from lib.rs.
  • Kept the callback translator and setup macro contract intact at the FFI boundary.

Chain Context

  • Start: PR refactor(whatsrust): extract callback registrations #311 (refactor/whatsrust-callback-registrations).
  • End: lifecycle wrappers isolated; presence, media, and action slices remain.
  • Dependency: this PR is the immediate parent for the presence slice.
  • Diagram: #301 -> #311 -> 📍 #312 -> #313 -> #314 -> #315.
  • Deferred: Cargo compilation/tests are intentionally deferred per task instructions; only formatting/source/diff checks were run.
  • Rollback: revert commit 235b3ba / remove lifecycle.rs and restore these wrappers 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 #307

@Andiveli Andiveli added the type:refactor Code refactoring label Aug 26, 2026
# Conflicts:
#	whatsrust/src/lib.rs
@Andiveli
Andiveli changed the base branch from refactor/whatsrust-callback-registrations to beta August 27, 2026 00:04
@Andiveli
Andiveli merged commit c46d097 into beta Aug 27, 2026
1 check passed
@Andiveli
Andiveli deleted the refactor/whatsrust-lifecycle-wrappers 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