Skip to content
Commit Detail

Commit 87e1983

Author
Sophie Wallace <swallace@cloudflare.com> 2026-02-04 14:04:18 +0000
Parents
ce52408
Tree
1f152c5
Loopback service stubs accept a dynamic version (cohort) parameter

Similar to `props`, this allows a worker to call the service stub as a
function, passing along the given version information (currently only a
cohort string) to the runtime.

workerd's server implementation currently ignores this information, so
the test included in this commit is very minimal. We could come up with
a better test once we've decided how this information will be exposed to
the worker, assuming it also makes sense in the workerd runtime. The
internal codebase tests this feature in more depth.

The feature is behind the experimental `enable_version_api` flag. Usage
looks like:
`let service = ctx.exports.default({ version: { cohort: "blah" } });`

Files changed