Skip to content

Test proxying an RPC stub all the way to Durable Objects.#122

Merged
kentonv merged 2 commits intomainfrom
kenton/test-proxy-to-workers
Feb 5, 2026
Merged

Test proxying an RPC stub all the way to Durable Objects.#122
kentonv merged 2 commits intomainfrom
kenton/test-proxy-to-workers

Conversation

@kentonv
Copy link
Member

@kentonv kentonv commented Dec 23, 2025

In particular, the DO keeps a dup() of the stub and uses it later, after the original subscription call has returned. This requires the rpc_params_dup_stubs compat flag, which is new in yesterday's workerd release.

Since wrangler is not updated yet, this requires a package version override for now. Once wrangler has been updated, I'll remove the override and then merge this.

DO NOT MERGE until the override can be removed.

Fixes #110

UPDATE Feb 5: This has now been updated to use the latest wrangler/workerd so it can run without overrides.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2025

⚠️ No Changeset found

Latest commit: a3ec9df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 23, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/capnweb@122

commit: a3ec9df

@kentonv kentonv force-pushed the kenton/test-proxy-to-workers branch 2 times, most recently from be36079 to 0e15d03 Compare December 23, 2025 16:01
Base automatically changed from kenton/dup-targets-in-params to main December 23, 2025 17:11
@kentonv kentonv force-pushed the kenton/test-proxy-to-workers branch from 0e15d03 to ddeca75 Compare December 23, 2025 17:11
In particular, the DO keeps a dup() of the stub and uses it later, after the original subscription call has returned. This requires the `rpc_params_dup_stubs` compat flag, which became default as of 2026-01-20, hence the compat flag update.

Fixes #110.
@kentonv kentonv force-pushed the kenton/test-proxy-to-workers branch from ddeca75 to a3ec9df Compare February 5, 2026 16:34
@kentonv kentonv marked this pull request as ready for review February 5, 2026 16:42
@kentonv kentonv merged commit e3fa093 into main Feb 5, 2026
7 checks passed
@kentonv kentonv deleted the kenton/test-proxy-to-workers branch February 5, 2026 22:40
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.

Bidirectional calling with Durable Objects (Error: RPC stub used after being disposed)

2 participants