Azure SDK for Rust (October 2026)
The Azure SDK team is pleased to announce our October 2026 client library releases.
6 packages released this month.
Stable Packages (3)
-
Cosmos DB
-
Cosmos DB Client Driver
-
Cosmos DB SDK Macros
Beta Packages (3)
-
Cosmos DB
-
Cosmos DB Client Driver
-
Cosmos DB SDK Macros
Release highlights
Cosmos DB 1.0.0-beta.1 Changelog
Features Added
- Added
CosmosTracingHandlerBuilder::build_with_tracerfor binding the handler to an explicit OpenTelemetry tracer. (#5332) - Added per-query
QueryOptions::max_buffered_query_windowandwith_max_buffered_query_windowto configure the maximum global OFFSET plus effective take for client-buffered queries (default 1000, no opt-out). (#5301) - Extended Cosmos binary JSON encoding to cross-partition
DISTINCTquery pages. (#5070) - Added
QueryPlanMode::{LocalPreferred, GatewayOnly}, allowing applications to force Gateway query planning for an individual query as a livesite mitigation. (#5181) - Added finite cross-partition
ORDER BY VectorDistance(...)queries withTOPorOFFSET/LIMIT. Results are fully buffered before the first page and cannot be resumed from continuation tokens. Hybrid/full-text vector ranking remains unsupported. (#5130) - Extended Cosmos binary JSON encoding to the thin client (Gateway 2.0) transport. (#5284)
Breaking Changes
- Replaced
EffectivePartitionKeystringFromconversions with strictTryFromconversions; malformed hexadecimal bounds now return errors instead of being truncated, including when deserializing feed ranges. #5369 - Re-exported the driver’s
CosmosError,CosmosStatus, andSubStatusCodedirectly, removing the SDK-ownedCosmosErrorwrapper and all associatedCosmosStatusandSubStatusCodeconstants from the supported SDK surface. (#5355) - Replaced the
metricsanddistributed_tracingfeature flags with the off-by-defaultpreview_opentelemetryflag for both OpenTelemetry handlers; enablepreview_opentelemetryto keep emitting metrics and traces. Diagnostics types remain available without it. (#5353) CosmosTracingHandleris now constructed exclusively throughCosmosTracingHandler::builder(). Thenew,with_thresholds, andwith_thresholds_and_rate_limitconstructors and theDefaultimplementation were removed; configure the equivalent values with the builder and callbuildorbuild_with_tracer. (#5332)- Re-exported
UserAgentSuffixreplaces panickingnewwithTryFrom<String>andTryFrom<&str>, returning a typedCosmosErrorfor invalid suffixes. (#5345) - Re-exported
PartitionKeyandPartitionKeyValuenow useTryFromfor dynamically sized key vectors and floating-point values, returning typed errors instead of panicking on excess components or non-finite numbers. (#5345) - Removed throughput-control group registration and the group name/options re-exports; configure priority and throughput buckets directly through
OperationOptions::throughput_control. (#5343) - Moved
query_plan_modefromOperationOptionsto per-queryQueryOptions; removed client/runtime defaults and environment settings, including the query-plan-mode override. The default remainsLocalPreferred. (#5301) - Unordered cross-partition DISTINCT and non-streaming ORDER BY require finite global TOP/LIMIT with OFFSET plus effective take within the configured maximum; missing bounds, excess windows, and overflow fail with 400/20125. (#5301)
- Unified client-buffered continuation errors under 400/20124, retaining the shape-specific constants as aliases; finite-window admission moved from 20126 to 20125 and non-streaming window/storage errors from 20127 to 20126. (#5301)
- Reviewed public API type consistency for time durations and integer sizes.
ResponseHeaders::server_duration_ms()andretry_after_ms()are replaced byserver_duration()andretry_after(), both returningOption<Duration>;TransactionalBatchOperationResult::retry_after_milliseconds()andDistributedTransactionResponse::retry_after_ms()are similarly replaced byretry_after() -> Option<Duration>.ThroughputProperties::manual,autoscale,throughput(), andautoscale_maximum()now useu64instead of the platform-dependentusize, allowing RU/s values above 4 billion;autoscale_increment()now usesu32because it returns a percentage. (#5204) - Replaced
CosmosClientBuilder::with_partition_key_range_cache_enabledwithPartitionFailoverOptionsBuilder::with_partition_topology_cache_mode; partition topology caching can no longer be disabled, andPartitionTopologyCacheMode::{Eager, Lazy}controls only when the cache is loaded. (#5319) - Container resolution now loads the complete partition topology by default and fails if it cannot load a valid routing map.
PartitionTopologyCacheMode::Lazypreserves the previous first-use loading behavior as a compatibility escape hatch. (#5319) - Moved the PATCH-specific models, distributed transaction PATCH APIs, and PATCH-related operation options behind the
preview_patchfeature. These APIs remain available to preview-feature consumers but are no longer part of the default feature set. (#5346) - Removed the public
ConsistencyLevelandCosmosClientOptionstypes and theOperationOptionsView,ThrottlingRetryOptionsView, andThroughputControlOptionsViewre-exports. UseReadConsistencyStrategyand typed operation options instead; client configuration remains available throughCosmosClientBuilder. The tuple fields ofSessionTokenandExcludedRegionsare now private; use their constructors,From,iter,len, andis_emptyAPIs. (#5352)
Bugs Fixed
- Fixed
serde_json::value::RawValuedeserialization for binary-encoded responses:ResponseBody::into_single(and theinto_modelhelpers built on it) now yield the document’s JSON text for aRawValuetarget instead of failing, restoring raw passthrough now that binary encoding is on by default. (#5338) - Container recreation now preserves collection RID mismatch errors during cold partition routing and rejects incompatible stale partition keys with a dedicated client substatus. (#5324)
- Change feed reads now work over Gateway 2.0 by forwarding incremental-mode and wire-format-version request metadata. (#5332)
- Cosmos root spans now use the last retained request endpoint for their fallback
server.address, matching the operation-duration metric when no SDK operation context supplies an address. (#5332) - Added partition-merge support and preserved point-in-time change feed filtering across merged partitions by retaining
If-Modified-Sincealongside continuations on Gateway V1 and Gateway V2. (#4122) - Name-based container clients now automatically recover when a container is deleted and recreated. (#5219)
Cosmos DB 1.0.0 Changelog
Breaking Changes
- Renamed the
preview_dtx,preview_patch, andpreview_opentelemetryfeature flags tounstable_dtx,unstable_patch, andunstable_opentelemetry, respectively; update dependency feature selections to use the new names. (#5426) - Changed the
User-Agentheader format toazsdk-rust-cosmos/{sdk-version} (drv={driver-version}; {os}; {arch}; {rustc}[; ft={B64}]) [{suffix}], replacing the separate driver and platform tokens and the trailing|F<HEX>feature-flag token. To fit the 255-byte limit, platform segments are removed whole from right to left; once none remain, the parentheses are omitted and the suffix, then the SDK identifier, may be shortened. (#5406) - Terminal service 404/1002, 403/3, and 403/1008 errors now surface as synthetic 503/20310, 503/20311, and 503/20312 errors, retaining the original wire error in
source(). (#5392) - Renamed
CosmosCredential::MasterKeytoCosmosCredential::AccountKey(#5421).
Cosmos DB Client Driver 1.0.0-beta.1 Changelog
Features Added
- Added per-query
PlanOptions::max_buffered_query_window,with_max_buffered_query_window, andDEFAULT_MAX_BUFFERED_QUERY_WINDOW(1000) to cap global OFFSET plus effective take for client-buffered queries, with no opt-out. (#5301) - Extended Cosmos binary JSON query-page handling to cross-partition
DISTINCT, including composition with streamingORDER BYandOFFSET/LIMIT/TOP. (#5070) - Added local Rust query planning for supported cross-partition queries, avoiding Gateway query-plan requests while retaining native and Gateway fallbacks for advanced query shapes, and
QueryPlanMode::{LocalPreferred, GatewayOnly}to select providers per query. (#5181) - Added a fully buffered cross-partition merge for finite non-streaming
ORDER BYplans, includingVectorDistance(...). Resumed, DISTINCT, and hybrid non-streaming plans are rejected with typed statuses. (#5130) - Added Cosmos binary JSON encoding support over the thin client (Gateway 2.0) path by forwarding the
x-ms-cosmos-supported-serialization-formatsheader as the RNTBDSupportedSerializationFormatstoken. (#5284)
Breaking Changes
- Replaced
EffectivePartitionKeystringFromconversions with strictTryFromconversions and made deserialization reject malformed hexadecimal bounds;PartitionKeyRange::newnow requires parsedEffectivePartitionKeybounds. #5369 - Moved all
CosmosStatusconstants and the independently usedSubStatusCodeconstants toerror::status_codes; raw substatus constants are undererror::status_codes::substatus, and constants used only to construct combined statuses were removed. (#5355) UserAgentSuffixreplaces panickingnewwithTryFrom<String>andTryFrom<&str>, returning a typedCosmosErrorfor invalid suffixes. (#5345)- Replaced panicking partition-key vector and floating-point
Fromconversions with typedTryFromerrors; infallible key conversions remain unchanged. (#5345) - Removed throughput-control group registration, group types, and
ThroughputControlOptions::group_name; direct priority and throughput-bucket options remain available. (#5343) - Moved
query_plan_modefromOperationOptionstoPlanOptions; removed account/runtime defaults and environment settings, including the query-plan-mode override. The default remainsLocalPreferred. (#5301) - Unordered cross-partition DISTINCT and non-streaming ORDER BY require finite global TOP/LIMIT with OFFSET plus effective take within the configured maximum; missing bounds, excess windows, and overflow share 400/20125 (
CLIENT_BUFFERED_QUERY_REQUIRES_FINITE_WINDOW). (#5301) - Unified client-buffered continuation errors under 400/20124 (
CLIENT_BUFFERED_QUERY_CONTINUATION_UNSUPPORTED), retaining the shape-specific constants as aliases; finite-window admission moved from 20126 to 20125 and non-streaming window/storage errors from 20127 to 20126. (#5301) - Replaced
DriverOptionsBuilder::with_partition_key_range_cache_enabledwithPartitionFailoverOptionsBuilder::with_partition_topology_cache_mode; partition topology caching can no longer be disabled, andPartitionTopologyCacheMode::{Eager, Lazy}controls only when the cache is loaded. (#5319) -
CosmosDriver::resolve_container_by_nameandresolve_container_by_ridnow load the complete partition topology by default and fail withCLIENT_TOPOLOGY_RESOLUTION_FAILEDwhen no valid routing map can be loaded.PartitionTopologyCacheMode::Lazypreserves first-use loading. (#5319) error::cosmos_statusis no longer a public module;CosmosStatusandSubStatusCoderemain available as re-exports fromerror. The internal-onlyquerymodule (gated behind the__internal_testingfeature) is now#[doc(hidden)]so it no longer appears as an empty public module in generated API surfaces. (#5205)CosmosRequestHeaders::offer_throughput,OfferAutoscaleSettings::max_throughput,OfferAutoscaleSettings::new,OfferAutoscaleSettings::with_increment_percent, andAutoscaleThroughputPolicy::increment_percentnow useu32instead of the platform-dependentusize, matching the RU/s values Cosmos DB actually returns. (#5204)- Renamed several types for naming consistency:
diagnostics::PipelineTypeis nowdiagnostics::PipelineKind(following theKind-over-Typeconvention),diagnostics::ProxyConfigurationis nowdiagnostics::ProxyConfig(matching theConfignaming used elsewhere), andin_memory_emulator::RuChargingModelis nowin_memory_emulator::RequestUnitChargingModel(expanding theRUacronym). The unstabletestingmodule (__internal_mockingfeature) was renamed totest. (#5203) - Moved
OperationOptions::patch_strategyand its generated builder, view, and environment APIs behind thepreview_patchfeature. Core PATCH execution remains available without the feature. (#5346) - Made the tuple fields of
SessionTokenandExcludedRegionsprivate. UseSessionToken::newand itsFrom,as_str,AsRef<str>, andDisplayimplementations, orExcludedRegions::new,with_region,FromIterator,iter,len, andis_emptyinstead. (#5352)
Bugs Fixed
- Account metadata now honors the service-provided
disableCrossRegionalHedgingsignal for data-plane and eligible metadata operations, including refresh transitions and omitted-property retention. (#5350) - Fixed
serde_json::value::RawValuedeserialization on the Cosmos binary JSON path:binary_json::from_sliceandResponseBody::into_single/into_itemsnow render the value’s JSON text for aRawValuetarget instead of failing with a misclassified serialization error, soRawValuecallers keep working now that binary encoding is on by default. (#5338) - Reconciled dataflow partition-range identity resolution across logical, EPK, sequential, and hedged requests, preserving split-parent session tokens on Gateway 2.0 while keeping logical partition-key wire routing unchanged, and enforcing the end-to-end timeout across planning and first-page execution. (#5315)
- Container recreation now preserves collection RID mismatch errors during cold partition routing and rejects incompatible stale partition keys with a dedicated client substatus. (#5324)
- Gateway 2.0 change feed requests now forward incremental-mode and wire-format-version metadata, so change feeds work over the thin-client transport. (#5332)
- In-memory emulator query, change-feed, and point reads now apply composite session-token range validation only to the physical partitions selected by the request, so an obsolete unrelated segment no longer rejects an otherwise valid scoped read. Explicit stale physical-range targets still return 410/1002 and trigger partition-topology refresh and retry. (#5332)
- Fixed V1 partition key routing for non-ASCII strings by truncating at 100 UTF-16 code units and applying the service’s separate binary byte limit without panicking on split characters. (#5280)
- Added partition-merge routing support, advertised the merge capability bits, and retained point-in-time change feed filtering across merged partitions on Gateway V1 and Gateway V2. (#4122)
- Cosmos driver user agents now include the build-time Rust compiler version instead of
rustc/unknown. (#5201) - Name-addressed container operations now refresh metadata and retry once after container recreation, clearing generation-specific session and partition-routing state before targeting the replacement. (#5219)
Cosmos DB Client Driver 1.0.0 Changelog
Features Added
- Added
UserAgentPropertyandCosmosDriverRuntimeBuilder::with_user_agent_propertyso wrapping SDKs can add validatedkey=valueentries (for example a language runtime version such asrt=.NET 8.0.1; values may contain spaces but never;,(, or)) to theUser-Agentmetadata segment. (#5406)
Bugs Fixed
- Preserve admitted throttle retry settings during operation-triggered account metadata refresh, including regional and HTTP-version recovery paths. (#5366)
- Honor per-operation endpoint unavailability TTL and runtime TTL updates during routing without changing sibling operations’ cooldown intervals. (#5366)
Breaking Changes
- Renamed the
preview_dtxandpreview_patchfeature flags tounstable_dtxandunstable_patch, respectively; update dependency feature selections to use the new names. (#5426) - Changed the
User-Agentheader to a compact, parsable format used by every Cosmos SDK:{sdk}/{version} (drv={driver}; {os}; {arch}; {rustc}[; ft={B64}][; {key}={value}]...) [{suffix}]. Feature flags are big-endian bytes without leading zeros, base64url-encoded without padding (e.g.ft=Egfor 0x12). To fit the 255-byte limit, platform segments are removed whole from right to left, withdrvremoved last; empty parentheses are omitted, then the suffix is shortened if needed, and finally the SDK identifier. The suffix is never normalized. (#5406) - Terminal service 404/1002, 403/3, and 403/1008 errors now surface as synthetic 503/20310, 503/20311, and 503/20312 errors, retaining the original wire error in
source(). (#5392) - Renamed
Credential::MasterKeytoCredential::AccountKeyandAccountReference::with_master_key()toAccountReference::with_account_key(). (#5421)
Cosmos DB SDK Macros 1.0.0-beta.1 Changelog
Breaking Changes
CosmosOptionsnow propagates field-level#[cfg]attributes to generated builders, views, defaults, and environment-variable APIs. (#5346)
Cosmos DB SDK Macros 1.0.0 Changelog
Features Added
- Added
#[option(skip)]for internal optional state excluded from configuration views and builder setters. (#5366)
Latest Releases
View all the latest versions of Rust crates here.
Installation Instructions
To install any of our crates, copy and paste the following commands into a terminal:
$> cargo add azure_data_cosmos@1.0.0-beta.1
$> cargo add azure_data_cosmos@1.0.0
$> cargo add azure_data_cosmos_driver@1.0.0-beta.1
$> cargo add azure_data_cosmos_driver@1.0.0
$> cargo add azure_data_cosmos_macros@1.0.0-beta.1
$> cargo add azure_data_cosmos_macros@1.0.0
Feedback
If you have a bug or feature request for one of the libraries, please post an issue to GitHub.