From d45dd50f6e18f298667df1852279249a3dffe26c Mon Sep 17 00:00:00 2001 From: "fctl-sh[bot]" <343971779+fctl-sh[bot]@users.noreply.github.com> Date: Sun, 18 Oct 2026 04:05:29 +0000 Subject: [PATCH] fix(xtask): install worker-build when cargo xtask dev needs it wrangler.toml builds the Worker with `worker-build --dev`, but only `cargo xtask deploy` installed it, so on a machine without it `cargo xtask dev` built everything and then failed when wrangler started. It now calls util::worker_build() first, as deploy does, and the setup docs list worker-build with what its build needs on Debian and Ubuntu. Fixes #41 Refs #34 Co-Authored-By: Claude Opus 5.5 --- docs/development.md | 5 +++++ xtask/src/dev.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/development.md b/docs/development.md index a7148314..15149719 100644 --- a/docs/development.md +++ b/docs/development.md @@ -11,6 +11,11 @@ subscription, Cloudflare account or GitHub App. wrangler). The web app depends on [@hyperstructure/design](https://github.com/hyperstructure/design) through git, so `npm ci` needs read access to that repository while it is private. +- [worker-build](https://crates.io/crates/worker-build), which builds the + control plane for wrangler. The first `cargo xtask dev` installs it with + `cargo install` if it isn't on your PATH. On Linux that needs pkg-config + and OpenSSL's headers: `sudo apt install pkg-config libssl-dev` on Debian + and Ubuntu. - Optional, for release builds: [zig](https://ziglang.org) and `cargo install cargo-zigbuild`. diff --git a/xtask/src/dev.rs b/xtask/src/dev.rs index 11a80e90..b852ccba 100644 --- a/xtask/src/dev.rs +++ b/xtask/src/dev.rs @@ -46,6 +46,9 @@ pub fn dev(root: &Path, opts: DevOpts) -> Result<()> { if !root.join("node_modules").exists() { util::npm_install(root)?; } + // wrangler dev builds the Worker with `worker-build --dev` (wrangler.toml): + // this installs it when it is missing. + util::worker_build()?; dev_vars(root)?; run(Command::new("cargo") .args([