Skip to main content

Module bindings

Module bindings 

Source
Expand description

One binding model per build (back-half paydown 1C.1a, Decisions A to E of #4031).

WorkerBindings holds every binding each context’s Worker declares, in the order its wrangler.toml lists them, and each Worker’s own list (its members’ merged). It is derived once from the ComposePlan and the checked unit tables by WorkerBindings::derive; nothing else computes which bindings a Worker has.

The vocabulary (BindingSource, WorkerBinding) stays in bynk-check, which needs it for the duplicate-binding diagnostics. The model, its derivation and its order are the emitter’s. The order is a stable sort by rank, one exhaustive match, so a new kind of binding fails to compile until it is placed, rather than being silently left out of wrangler.toml.

Structs§

WorkerBinding
One binding a Worker declares: the name its env field and its wrangler.toml entry share, and where that name came from.
WorkerBindings
Every binding of every Worker in a build.

Enums§

BindingSource
What put a binding into a Worker’s wrangler.toml: the source a bynk.context.duplicate_binding diagnostic names.

Functions§

service_binding
The Service Binding to context target’s Worker.
singleton_binding
#3300: the binding of bynk.cloudflare’s one-per-Worker capability capability (Version → CF_VERSION_METADATA), by the registry’s fixed name. Its one TypeScript read is the default of its provider’s binding parameter in cloudflare.binding.ts.