Skip to content

v0.4.0

Choose a tag to compare

@joaquinbejar joaquinbejar released this 20 Jun 08:49
· 40 commits to main since this release
ea1245d

This release adds server-initiated unicast push to the server engine and unifies crate versioning across the workspace.

Highlights

ServerHandle::send_to — unicast push (#53)

  • ServerHandle::send_to(session_id, message) — server-initiated push to a single session, complementing broadcast (all sessions). Non-blocking: the request is queued as a new ServerCommand::SendTo(u64, Vec<u8>) on the control channel and the run loop performs the actual send.
  • The run-loop handler resolves the target in the live session-sender registry and opportunistically reaps a closed channel (mirroring Broadcast's cleanup). A missing or already-gone session id is a benign no-op.
  • LocalServer (single-threaded, thread-per-core) treats SendTo as a no-op — it tracks no session-sender registry, same as its Broadcast.
  • Enables subscription-gated server push (e.g. an account-manager's live MmEligibilityChanged stream) without broadcasting to every session.

Breaking changes

  • ServerCommand is now #[non_exhaustive]. Adding the SendTo variant to the public exhaustive enum was a breaking change (cargo-semver-checks: enum_variant_added). The enum is now marked #[non_exhaustive] so future command additions stay non-breaking — downstream code matching on ServerCommand must add a wildcard arm.

Workspace

  • Unified versioning — all crates now inherit a single version from [workspace.package] (version.workspace = true) instead of pinning a version each. The whole workspace moves to 0.4.0 together.
  • Dependency refresh (bytes 1.11 → 1.12).

Full changelog: v0.3.0...v0.4.0