Skip to content

exposing WorkerEntrypoints via Cap'n Web #182

@dimitropoulos

Description

@dimitropoulos

Currently a Worker can call another Worker over RPC using a service binding. This uses the runtime's built-in type system. The target worker implements the RPC interface as a class extending WorkerEntrypoint, and exports that.

We should let people expose the same WorkerEntrypoint on a public HTTP route using Cap'n Web. Then, when a WorkerEntrypoint is mapped to an HTTP endpoint, the developer should be able to enable automatic Cap'n Web support, making the entrypoint's RPC methods available to the internet.

When we do this, the Worker itself does not need to import the Cap'n Web library. Instead, it strictly speaks runtime-native RPC. We could bridge this to Cap'n Web in a separate isolate we maintain ourselves (with the possibility of optimizing it to native code someday).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions