Skip to content

hibira crate 0.1.0: realtime, waiting rooms (Axum/Actix), Chat API, Approvals, Live Chat - #1

Merged
deflinhec merged 2 commits into
mainfrom
claude/project-thread-y7499h
Nov 26, 2026
Merged

deflinhec merged 2 commits into
mainfrom
claude/project-thread-y7499h

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

Summary

The first version of the hibira crate, the Rust server SDK.

  • Realtime: Client::trigger, Config::authorize_channel (private and presence), authenticate_user (pusher-js signin()) and verify_webhook.
  • Waiting rooms: verify, sign_user, waiting_room_url and a framework-agnostic Guard::decide, plus axum_guard (feature axum) and actix_guard (feature actix). Behaviour matches the Go module and the npm package:
    • 302 redirect to the hosted page with no-store
    • 403 JSON for any method other than GET/HEAD
    • the pass goes into the hibira_wr_<room> HttpOnly cookie and is stripped from the URL
  • Chat API: client.chat() covers every route, plus request() for anything else.
  • Approvals: request, get, wait, reply, and verify_callback for Hibira-Signature callbacks.
  • Live Chat: user_hash, identity and script_tag (HTML-escaped).
  • Features: client is on by default and uses reqwest with rustls. With --no-default-features the crate has no network code at all.
  • CI: fmt, clippy with -D warnings, and tests with and without client.
  • Release: a crates.io publish workflow runs on GitHub Release and needs a new org secret CARGO_REGISTRY_TOKEN for this repo. A release-notify workflow is included too.
  • Repo setup: README in English with a 中文摘要. main was empty, so it now has a LICENSE-only initial commit to serve as the PR base.

Test plan

  • cargo test --all-features: 21 tests pass.
    • Channel auth and signed queries are checked against the worked examples in the Pusher reference.
    • Waiting room code is checked against the shared server test vector.
    • The HTTP client is checked against a local server, verifying the HMAC signature and body_md5 on every request.
    • The Axum and Actix middleware are tested end to end.
  • cargo test --no-default-features, cargo clippy --all-features --all-targets -D warnings, cargo doc

Generated by Claude Code

…pprovals, Live Chat

Signing and channel auth checked against the Pusher reference vectors,
waiting room passes against the shared server vector, and the HTTP client
against a local server. CI runs fmt, clippy and tests with and without the
client; releases publish to crates.io.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCCKScUUX9khSrU2wij
@deflinhec deflinhec self-assigned this Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCCKScUUX9khSrU2wij
@deflinhec
deflinhec marked this pull request as ready for review November 26, 2026 08:57
@deflinhec
deflinhec merged commit 6f1fb9a into main Nov 26, 2026
1 check passed
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