Skip to content

refactor: use MaybeSend/MaybeSync on registry traits#35

Open
alukach wants to merge 1 commit into
refactor/simplify-cf-workersfrom
refactor/maybe-send-registry
Open

refactor: use MaybeSend/MaybeSync on registry traits#35
alukach wants to merge 1 commit into
refactor/simplify-cf-workersfrom
refactor/maybe-send-registry

Conversation

@alukach
Copy link
Copy Markdown
Member

@alukach alukach commented Apr 16, 2026

Summary

  • Changes BucketRegistry and CredentialRegistry trait bounds from Send + Sync to MaybeSend + MaybeSync
  • Changes future return bounds from + Send to + MaybeSend
  • Allows WASM implementations to use !Send types (like worker::Fetch and the CF Cache API) directly

This eliminates the painful spawn_local + oneshot channel bridge pattern that every CF Workers consumer must use when implementing these traits.

Test plan

  • cargo test passes (all native tests)
  • cargo check --target wasm32-unknown-unknown -p multistore-cf-workers passes

🤖 Generated with Claude Code

…istry

This allows WASM implementations to use !Send types (like worker::Fetch
and the CF Cache API) directly, eliminating the need for spawn_local +
oneshot channel bridges.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant