Skip to content

chore(deps): move the worker crates to workers-rs 0.9 - #303

Merged
aRustyDev merged 2 commits into
mainfrom
chore/worker-0-9
Nov 18, 2026
Merged

aRustyDev merged 2 commits into
mainfrom
chore/worker-0-9

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

What

  • worker, worker-macros and worker-sys go from 0.8.7 to 0.9.0 in the five crates that use them: thrust-worker, thrust-adapters-cloudflare, thrust-edge, thrust-preview-provisioner and the thrust-editor-worker spike.
  • CI's worker-build pin (.github/actions/setup-rust/action.yml) and the line that states it in docs/src/architecture/cicd.md go to 0.9.0.
  • The lock also moves the wasm-bindgen family (wasm-bindgen, -futures, -macro, -macro-support, -shared, js-sys, web-sys) from 0.2.129 to 0.2.130, which worker 0.9 requires. Nothing else moves.
  • A comment in crates/worker/wrangler.toml records the wrangler requirement below.

Why

Part of #53 (permanent versus transient consumer errors). Its retry delay and its "this was the last delivery" decision need the delivery count of a queue message. MessageExt::attempts() first appears in worker 0.9.0; 0.8.7 cannot read it (the wrapped JS message is a private field). Nothing in this PR reads attempts() yet, and no behaviour change is intended.

Read this before you run the Worker locally

A Worker built on worker 0.9 does not run on wrangler 4.123.0 (the Homebrew version); it runs on 4.151.2, the version CI pins. 0.9 wraps every #[event] handler in a span and calls tracing.getActiveSpan() of cloudflare:workers. Cloudflare's changelog dates that call to the runtime at 2026-09-25, and the workerd in 4.123.0 accepts compatibility dates only up to 2026-08-18.

Measured with the same build and the same wrangler.toml, changing only which wrangler is first on PATH:

wrangler scripts/contract.sh worker-cf
4.123.0 every request 500 Critical error from Tracing::get_active_span; /healthz never turns healthy; exit 4. Twice (main, then bindings).
4.151.2 main 71/71 (expected=71), bindings 5/5 (expected=5)

The newest wrangler that fails is not known; only these two were run.

Two more local-only facts:

  • scripts/rs finds worker-build through ~/.cargo/bin, so a local build needs cargo install worker-build --locked --version =0.9.0.
  • worker-build deletes every cached wasm-bindgen version in ~/Library/Caches/worker-build before it downloads the one it wants. While some worktrees are on 0.8.7 (wants 0.2.129) and others on 0.9.0 (wants 0.2.130), alternating builds on one machine remove each other's CLI mid-build: my first 0.9.0 build died with Running the wasm-bindgen CLI: No such file or directory while another worktree's 0.8.7 build was running. WASM_BINDGEN_BIN=<path to a 0.2.130 wasm-bindgen> skips the cache.

What I ran

On the branch rebased onto main at 3f3c3a9 unless noted.

  • cargo fmt --all --check, cargo clippy --workspace --all-targets --locked -- -D warnings, and CI's two wasm32 clippy steps (thrust-worker --no-default-features, thrust-edge): clean.
  • cargo check for each of the five crates alone on wasm32 (before the rebase): clean. Checking several of them in one cargo call fails on thrust-edge because the http feature of worker is unified on; fetch_request has the same signature in 0.8.7, and CI never combines them.
  • Hermetic tests: thrust-edge 228, thrust-adapters-cloudflare 229, thrust-preview-provisioner 4, all passed (before the rebase). They are native tests and do not run these crates in workerd.
  • worker-build 0.9.0 builds crates/worker in release (--no-default-features), and wrangler deploy --dry-run bundles that output, import source included, with both 4.123.0 and 4.151.2. A copy of the build with a syntax error fails the same dry run (exit 1), so the check can fail.
  • All 18 run steps of CI's deps job, read from lint.yml and run in order. Step 17 downloads a linux actionlint into $RUNNER_TEMP, so I ran the script it wraps (.github/scripts/lint-actionlint.sh) with the native 1.7.12 binary instead; its built-in control behaved. The two steps that read Cargo.lock and the lint were rerun after the rebase (check-cargo-lock.sh: 492 packages).
  • .github/scripts/tests/test-deploy-template.sh (deploy parity, with its must-fail controls): 35 passed, 0 bad.
  • scripts/contract.sh worker-cf main and bindings on 4.151.2, as above.

What I did not run

  • scripts/e2e.sh worker-cf controls (the browser journeys); CI runs it on this PR, since a lockfile change runs everything.
  • The edge, the preview provisioner and the editor spike in workerd. They were checked, linted and tested natively only. The edge is the production routing Worker, so its first real run on 0.9 is its deploy; the deploy has a smoke and a rollback.
  • Cloudflare's production runtime. Its docs date getActiveSpan to 2026-09-25, so it should have it, but nothing of this build has run there yet.

🤖 Generated with Claude Code

aRustyDev and others added 2 commits November 18, 2026 00:40
worker, worker-macros and worker-sys go from 0.8.7 to 0.9.0 in the five crates that use them (the Worker, the Cloudflare adapter, the
edge, the preview provisioner and the editor spike), and CI's `worker-build` pin follows to 0.9.0. The lock also moves the wasm-bindgen
family from 0.2.129 to 0.2.130, which worker 0.9 requires.

Why now: 0.9.0 adds `MessageExt::attempts()`, the number of times a queue message has been delivered. 0.8.7 has no way to read it (the
inner JS message is a private field). The queue failure policy of #53 needs it to grow a retry delay and to know a last delivery.

No behaviour change is intended. Nothing in this change reads `attempts()` yet.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… 0.9

workers-rs 0.9 wraps every `#[event]` handler in a span and calls `tracing.getActiveSpan()` of `cloudflare:workers`. Cloudflare added that
call to the runtime on 2026-09-25, and the workerd inside wrangler 4.123.0 (which accepts compatibility dates only up to 2026-08-18) is
older. Measured with this config and the same build: wrangler 4.123.0 answers every request 500 `Critical error`, so `/healthz` never turns
healthy and `scripts/contract.sh worker-cf` exits 4 (twice); wrangler 4.151.2, the version CI pins, passes the `main` pass 71/71 and the
`bindings` pass 5/5. The newest wrangler that fails is not known, so the comment names only the two measured ones.

Refs: #53
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 18, 2026 05:42 — with GitHub Actions Inactive
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​worker@​0.8.7 ⏵ 0.9.08210093100100
Updatedcargo/​wasm-bindgen-futures@​0.4.79 ⏵ 0.4.8010010093100100

View full report

@aRustyDev
aRustyDev merged commit b0bcdbd into main Nov 18, 2026
45 checks passed
@aRustyDev
aRustyDev deleted the chore/worker-0-9 branch November 18, 2026 06:09

This branch was previously deployed

1 inactive deployment
preview-control-plane — 586d331b Deployed Nov 18, 2026 by aRustyDev via reconcile #84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant