Skip to content

ExecutionContext is missing exports filed available in Cloudflare Workers #4493

@Futhark

Description

@Futhark

What version of Hono are you using?

4.10.3

What runtime/platform is your app running on? (with version if possible)

Cloudflare Workers

What steps can reproduce the bug?

Creating a Cloudflare Workers app with enable_ctx_exports compatibility flag does not gives access to new property exports that should list all top-level exports like DurableObjects. Please check documentation: https://developers.cloudflare.com/changelog/2025-09-26-ctx-exports/

What is the expected behavior?

https://github.com/honojs/hono/blob/main/src/context.ts should not declare it's own ExecutionContext interface but use the one provided by worker-configuration.d.ts generated by wrangler. It could be achieved for example by passing ExecutionContext the same way as Binding and Variables:

const routes = new Hono<{ Bindings: CloudflareBindings; Variables: HonoAuthorizationContext, ExecutionContext: ExecutionContext }>();

What do you see instead?

No response

Additional information

This is the functionality available behind compatibility flag, but it looks like it will be GA anytime. Also enabling devs to pass their own type is always future-proof

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions