fix(cloudflare-code): the host build carries the sandbox-http native transport
ci / checks (push) Successful in 1m12s
ci / test (push) Successful in 41s
ci / wasm (push) Successful in 34s

The published rhema-sandbox-http gates its reqwest code on the wasm
target alone, so a featureless build compiles only on wasm — and the
DO declares the crate featureless, because workerd has no sockets.
On the host, where the neutral half compiles and tests, the feature
is not optional: without it the crate cannot resolve `reqwest` and
the workspace does not build. This workspace only ever saw the
feature on, masked by member unification under --all-features; the
extraction to registry deps removed the mask.

The declaration splits by target: featureless on wasm (the fetch
transport covers the protocol there), native on host. The crate's
own cfg keeps the reqwest code native-only either way; the feature
brings the dependency. The upstream gate repair — gating the code on
the feature, not just the target — rides the rhema side.
This commit is contained in:
vhaudiquet committed 2026-11-13 12:51:46 +01:00
1 parent 8f9ea41857
commit 09019b484d
1 file changed
+11 -2
+11 -2
View File
@@ -42,8 +42,11 @@ rhema-rsd = { version = "0.2.6", default-features = false }
rhema-sandbox = { version = "0.2.6", default-features = false }
# The protocol's HTTPS client: the `HttpTransport` seam this worker
# implements over host fetch, plus the `HttpSandbox` the `http` backend
# drives — reqwest behind its `native` feature, off here, workerd has
# no sockets
# drives. Featureless on wasm — workerd has no sockets — but with the
# crate's native transport on host builds: the host compiles the
# neutral half, and its only real transport is reqwest. The crate's
# own cfg keeps the reqwest code native-only; the feature brings the
# dependency.
rhema-sandbox-http = { version = "0.2.6", default-features = false }
rhema-transcript = { version = "0.2.6" }
# The typed errors the backend choice and the turn's durable pieces report
@@ -52,6 +55,12 @@ async-trait = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
# The same client with its native transport, host-only: the declaration
# above keeps the wasm build featureless, this one gives the host build
# the reqwest transport.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rhema-sandbox-http = { version = "0.2.6", default-features = false, features = ["native"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
# Pinned to 0.8 (verified against this tree): the DurableObject trait,
# SqlStorage, WebSocket, and Delay APIs this crate uses are 0.8-shaped;