Expand description
Shared Workers-build plumbing for bynk dev and bynk deploy.
Both commands do the same four things before they diverge: prepare a managed
build directory, compile the project into it, discover the worker directories
that came out, and shell wrangler. That machinery grew up inside dev.rs
and deploy.rs reached across for it, which left dev reading as deploy’s
utility library. It lives here instead — a sibling of both, owned by neither.
Structs§
- Build
- How a build is made: whether it reconciles
bynk.schema.lock, whether it only reports what a deploy would do (--dry-run), which never installs, and whether a missing npm package stops it instead of being installed (#3350). - Scratch
Build Dir - #3796: where a
bynk deploy --dry-runbuilds: a fresh directory under the system’s temporary directory, removed when this is dropped, so previewing a deploy leaves the project as it found it.
Enums§
- Select
Error - Why context selection failed — rendered to the user with the next step.
Functions§
- compile_
built compile_once_reporting, handing back the binding model the build wrote its Workers from (1C.3a, #4040), orNonewhen the build failed (already reported). The commands that act on a Worker’s bindings read this rather than reading them back out of the files.- compile_
once - One compile of the project into
build_dir, in-process, on the same rooting rule asbynk compile <project_root>(#524, viabynk_driver::project_options). Returnsfalseon failure with the diagnostics already rendered. - compile_
once_ reporting compile_once, reporting each context toprogressas it compiles (#3100).- discover_
workers - The worker directories under
<build>/workers/that carry awrangler.toml(the unitwrangler devcan serve), sorted for deterministic messages. - prepare_
build_ dir - Ensure
.bynk/is gitignored on first build (cargo’starget/.gitignoreprecedent — adevrun never dirtiesgit status), then clear theworkers/tree so selection only ever sees this build’s contexts (D1). - select_
contexts - Pick the workers
devwill serve together (#552). No--contextserves every context in the project — the whole point of the increment, since a cross-context call only resolves when its callee is up too.--contextis repeatable and narrows to a subset, inavailable’s deterministic order rather than the order they were typed, and duplicates collapse.