Commits
Click on a commit to change the comparison rangeAdd WorkerdDebugPort interface for dynamic RPC entrypoint access
Introduces a new privileged debug port interface that enables dynamic
access to worker entrypoints at runtime.
Currently, service bindings between workerd processes must be configured
at startup in the config file. Changing binding targets requires a full
process restart. This is problematic for local development tools like
Miniflare, which need to dynamically re-target RPC connections at runtime.
Today, Miniflare works around this by running a Node.js TCP server that
sits between workerd processes and manually re-routes RPC traffic. This
adds significant complexity and overhead.
This commit implements the WorkerdDebugPort interface which exposes all
service entrypoints in a process through a privileged RPC interface.
External tools can now:
- Get direct access to any entrypoint with custom props at runtime
- Start events and invoke methods via JS RPC without HTTP overhead
- Dynamically switch between entrypoints without process restarts
This enables Miniflare to eliminate its TCP proxy layer and handle
dynamic RPC routing natively through workerd.
```
interface WorkerdDebugPort {
getEntrypoint(service, entrypoint, props) -> (worker)
getActor(service, entrypoint, actorId) -> (actor);
}
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>