Repository navigation
·
2 commits
to 178a3b0bdec2717f60ab225ec66a36953a2f20d8
since this release
Minor Changes
AbortSignal::reason()now returnsJsValueinstead ofOption<JsValue>, matchingweb_sys::AbortSignaland the workers-types declaration. Before the signal is aborted the reason isundefined; usesignal.aborted()to check. (#1122)- Add
worker::observability, bindings for Workers custom trace spans.enter_span/enter_span_asyncrun code inside a new span,start_spanopens one without making it active, andSpan::in_scope/Span::instrumentmake a span active for a closure or a future, re-entering it on every poll so concurrent futures nest correctly. Every handler andwait_untilfuture now runs under the span active when it started. Needs a runtime withtracing.withActiveSpan. (#1123) - Add
D1PreparedStatement::raw_with_column_names, which callsraw({ columnNames: true })and returns the column names alongside the rows as(Vec<String>, Vec<Vec<T>>). The existingrawis unchanged. (#1060) - Add
State::block_concurrency_whilefor Durable Objects, binding the runtime'sblockConcurrencyWhilewith the same call-time semantics as JavaScript: the event delivery gate closes eagerly at the call, and the returned future yields the inner future's value when awaited. Discarding the future instead supports the constructor idiom, wherenew()gates delivery of all events until async initialization completes. A future returningErrrejects the promise and resets the object, matching a JavaScript throw; return errors insideOkto propagate them as values. (#1039) - Add
Storage::get_with_optionsandStorage::get_multiple_with_optionsfor Durable Objects, takingDurableObjectGetOptions(allowConcurrency,noCache). The existinggetandget_multipleare unchanged. (#1101) worker-buildno longer rewrites the Wasmimport sourceinbuild/index.jsto a plainimport, now that workerd and Wrangler support source phase imports. Needs a Wrangler version whose esbuild parsesimport source. (#1136)- Add
MessageExt::attempts(), the number of times a queue message has been delivered, starting at 1. (#1067) - Add
Queue::metrics(), binding the runtime'sQueue.metrics(). It returns aQueueMetricswith the backlog's message count, its size in bytes, and the timestamp of its oldest message (Nonewhen the backlog is empty), so producers can apply backpressure. (#1117) - Add
Request::signal(), which returns the request'sAbortSignal. For an incoming request it is aborted when the client disconnects, which requires theenable_request_signalcompatibility flag. (#1122)
Patch Changes
- Serialize
Ai::runandAi::run_bytesinputs as JSON-compatible values, so maps such as toolparametersare no longer sent as{}.Option::Nonefields are now sent asnull; use#[serde(skip_serializing_if = "Option::is_none")]to omit them. (#1062) - Make
Cf::timezone_name()returnOption<String>instead of panicking when the request has nocf.timezone, following the earlier change toas_organizationandasn. (#1099) - Accept the Node.js
Timeoutobject thatsetTimeoutreturns undernodejs_compat(default from compatibility date 2026-08-04) as theDelaytimer handle, soDelayno longer panics inworker-build --devbuilds. (#1095) - Send Durable Object
GetAlarmOptions/SetAlarmOptionsto the runtime as camelCase (allowConcurrency,allowUnconfirmed) soget_alarm_with_options,set_alarm_with_optionsanddelete_alarm_with_optionsno longer silently drop the options. (#1100) - Default
--emscriptenbuilds to a 1MB stack, matchingwasm32-unknown-unknownbuilds. Emscripten's 64KB default overflowed in debug builds of larger async code (e.g. a SQLxPgPool), surfacing asmemory access out of bounds. (#1121) #[event(queue)],#[event(email)]and#[event(connect)]handlers can return any error type convertible toBox<dyn std::error::Error + Send + Sync>orBox<dyn std::error::Error>(e.g.anyhow::Erroror a custom error), not onlyworker::Error. Such anErrrejects with a JSErrorcarrying the source chain, while types that implementInto<JsValue>keep their own conversion. (#1125)- Serialize
KvStore::putvalues withserde_json, soHashMap,BTreeMapandserde_json::Value::Objectfields are no longer stored as{}andnullmap entries are kept. (#1094) - An
Errreturned from an#[event(queue)]or#[event(email)]handler now rejects the handler's promise, as#[event(connect)]already does, instead of panicking. On the default (panic=abort) build that panic trapped the Wasm instance, failing other requests in flight in the isolate and reinitializing it, so static state was lost. The runtime still retries a failed queue batch. (#1115) - Serialize queue messages sent with the default
jsoncontent type JSON-compatibly, soHashMap,BTreeMapandserde_json::Value::Objectfields no longer arrive at consumers as{}andnullmap entries are kept.Option::Nonefields of such messages now arrive asnullinstead of being omitted, as withserde_json. (#1093) - Fix
r2::Object::http_metadata()andcustom_metadata()panicking on objects returned byBucket::list()when the listing did notincludethat metadata; they now return empty metadata. (#1098) - Fix
r2::Object::range()panicking withexpected instance of R2Rangeon every call; it now reads the runtime's plain{ offset, length }object and returns an error when the object was read without a range. (#1097) Cf::request_priorityreturnsNoneinstead of panicking whenrequestPriorityis empty, malformed or has noweight, and ignores unknown keys. (#1108)- Make
worker-buildhonour thewasm-bindgenversion pinned by the root package inCargo.lockwhen several versions are locked, instead of always taking the first (lowest) entry, and accept lockfile entries that carry a source suffix. (#1102) - Fix
worker-buildfailing withinvalid type: map, expected a stringwhen wasm-bindgen emits apackage.jsonwith adependenciesobject (wasm-bindgen 0.2.94 and later), which happens whenever a JS snippet imports an NPM package. (#1096)
What's Changed
- test: ensure socket is destroyed after the TCP handler returns by @ThomasRubini in #1075
- Take the tokio tag that coalesces hosted wakes only within a drive by @guybedford in #1077
- worker-build: find emscripten snippets beside the real link output by @guybedford in #1083
- feat: add bindings for inbound connect() UDP handler by @ThomasRubini in #1073
- worker-build: keep the producers section in emscripten builds by @JesusFileto in #1104
- worker-build: let explicit wasm-opt args control wasm names by @JesusFileto in #1091
- chore(deps-dev): bump vite from 8.2.1 to 8.3.4 by @dependabot[bot] in #1107
- fix: accept Node.js Timeout objects as the Delay timer handle by @rosalbito in #1095
- fix(r2): read Object::range() as a plain JS object by @rosalbito in #1097
- fix(r2): tolerate missing httpMetadata/customMetadata on listed objects by @rosalbito in #1098
- fix(cf): make timezone_name optional by @rosalbito in #1099
- fix(worker-build): read the dependencies map from wasm-bindgen's package.json by @rosalbito in #1096
- deps: update dependencies and wasm-bindgen@0.2.130 by @guybedford in #1119
- worker-build: default emscripten builds to a 1MB stack by @guybedford in #1121
- worker-build: emit Wasm source maps for emscripten builds by @JesusFileto in #1110
- feat: add Request::signal() by @nirajkhetre in #1122
- fix(worker-build): honour the root package's wasm-bindgen pin in Cargo.lock by @rosalbito in #1102
- feat(queue): add
Queue::metrics()by @rosalbito in #1117 - Return None from Cf::request_priority for an empty string by @tlq5l in #1108
- fix(durable): send alarm options as camelCase by @rosalbito in #1100
- fix(kv): serialize maps as objects in KvStore::put by @rosalbito in #1094
- fix(macros): reject instead of panicking when a queue or email handler returns Err by @rosalbito in #1115
- feat(durable): add get options (allowConcurrency, noCache) to Storage by @rosalbito in #1101
- emscripten-sqlx example by @ranile in #1088
- fix(http): preserve content length for exact-size response bodies by @nos1dot618 in #1068
- feat(macros): accept any std error type from queue, email and connect handlers by @guybedford in #1125
- fix(queue): serialize maps as objects for json content type by @rosalbito in #1093
- feat(queue): expose message attempt count by @nos1dot618 in #1067
- Rename template manifests to Cargo.toml.liquid by @connyay in #1085
- ci: skip unit and http tests on Windows by @guybedford in #1129
- fix: ai run json compatible serializer by @SameerVers3 in #1062
- Add worker::observability custom trace spans by @guybedford in #1123
- feat(d1): add raw_with_column_names for raw({ columnNames: true }) by @mqmalagris in #1060
- worker-build: keep the Wasm source phase import by @guybedford in #1136
New Contributors
- @JesusFileto made their first contribution in #1104
- @rosalbito made their first contribution in #1095
- @nirajkhetre made their first contribution in #1122
- @tlq5l made their first contribution in #1108
- @ranile made their first contribution in #1088
- @nos1dot618 made their first contribution in #1068
- @SameerVers3 made their first contribution in #1062
- @mqmalagris made their first contribution in #1060
Full Changelog: v0.8.7...v0.9.0