Azure SDK for Rust (August 2026)
The Azure SDK team is pleased to announce our August 2026 client library releases.
4 packages released this month.
Beta Packages (2)
-
Cosmos DB
-
Cosmos DB Client Driver
Release highlights
Cosmos DB 0.37.0 Changelog
Bugs Fixed
http://(non-HTTPS) account endpoints are now rejected unless the host is a known Cosmos DB emulator host, failing fast during client construction with an “invalid account endpoint” error instead of attempting an insecure connection to a production account. This validation also covers configured backup endpoints. (#4757)- Fixed hierarchical-partition-key (HPK) queries. A
FeedScope::partitionscope with only a prefix of the key hierarchy (e.g.("USA", "CA")on a/country/state/citycontainer) now filters to that prefix instead of returning every item in the physical partition (issue #4680), and cross-partition queries over an HPK container no longer fail with400 Bad Request(issue #4681). (#4729) - Fixed the
AZURE_COSMOS_PPCB_*environment variables (includingAZURE_COSMOS_PPCB_ENABLEDand theAZURE_COSMOS_PPCB_ENABLED_OVERRIDEkill switch) being ignored when aCosmosClientwas built without callingCosmosClientBuilder::with_partition_failover_options. The per-partition circuit breaker (PPCB) stayed enabled even withAZURE_COSMOS_PPCB_ENABLED=false. The client’s driver now resolves these options from the environment when they are not supplied explicitly. (#4655)
Features Added
- Added runtime diagnostics output configuration via
CosmosRuntimeBuilder::with_diagnostics_options, including the env-backedAZURE_COSMOS_DIAGNOSTICS_DEFAULT_VERBOSITYoption. The built-in default is now summary diagnostics JSON. (#4733) - Gateway 2.0 transport (a regional proxy forwarding RNTBD-over-HTTP/2) is selected automatically when the account advertises thin-client endpoints, the connectivity probe confirms them, and the runtime has not opted out. (#4319, #4803)
- Added the re-exported
ConnectionPoolOptions::gateway_v2_disabledandConnectionPoolOptionsBuilder::with_gateway_v2_disabled, withAZURE_COSMOS_CONNECTION_POOL_GATEWAY_V2_DISABLEDconfiguration and an environment-only_OVERRIDEincident switch. (#4763) - HTTP 449 (RetryWith) responses are now retried transparently in-region with exponential backoff, so callers no longer see spurious 449 errors from concurrent writes. (#4319)
ReadConsistencyStrategyis now honored across Gateway V1 and V2 reads. Adds theLatestCommittedvariant (a quorum read independent of the account default);GlobalStrongis rejected withBadRequestunless the account default isStrong. Per-request strategy overrides the client default. (#4319)- Added preview distributed transaction SDK builders, patch operations, diagnostics, and response accessors behind the disabled-by-default
preview_dtxfeature. (#4702) - Added change feed pull support via
ContainerClient::query_change_feed(), which takes a requiredChangeFeedStartFromstart position (Beginning,Now,PointInTime) and returns aChangeFeedPageIterator<T>that streamsFeedPage<T>results. NewfeedtypesChangeFeedPageIterator,FeedScope, andContinuationToken, plusoptionstypesChangeFeedOptionsandChangeFeedMode(currentlyLatestVersion); supports single-partition, per-partition-key, and full-container (cross-partition fan-out) reads with continuation-token resumption that persists the original start position so never-polled partitions don’t replay history on resume. (#4621) - Change feed items are now surfaced as an envelope.
ContainerClient::query_change_feed::<YourDoc>()yieldsChangeFeedItem<YourDoc>, binding the envelope into the return type so the post-change document is read viaChangeFeedItem::current()and cannot be silently deserialized away. The envelope also exposes the pre-change document (previous()) and per-changemetadata()(populated by full-fidelity reads; absent forLatestVersion). A full-fidelity delete returns an emptycurrentobject, which maps toNoneso callers with strict document types still deserialize the delete; the deleted item’s identity is available viaChangeFeedMetadata::id()andChangeFeedMetadata::partition_key().ChangeFeedOperationTypeincludes anUnknowncatch-all so a future operation type cannot fail a page and stall the feed. A backend that does not envelope change feed items (such as the Cosmos emulator) returns the bare document, which is mapped ontocurrent()so no data is lost. Added themodelstypesChangeFeedItem<T>,ChangeFeedMetadata,ChangeFeedOperationType, andLogicalSequenceNumber. (#4723) - Added
TlsBackend(re-exported) and atls_backendoption onConnectionPoolOptions(ConnectionPoolOptionsBuilder::with_tls_backend), defaulting toTlsBackend::Rustls, available under therustlsfeature, to pin the TLS backend used by the transport. This is additive and changes no behavior for the default (rustls) build; it only has an effect in builds that compile in multiple reqwest TLS backends, where reqwest would otherwise default to native-tls and the driver now pins rustls instead. (#4649)
Cosmos DB 0.37.1 Changelog
Bugs Fixed
- Fixed
ContainerClient::read_feed_rangesfailing on containers with large partition counts by fully draining routing metadata and retrying missing cache results with a forced refresh. (#4845)
Cosmos DB Client Driver 0.6.0 Changelog
Bugs Fixed
- Fixed a version-less
PartitionKeyDefinitiondeserializing to partition key version V2 instead of V1. The Cosmos service omits theversionfield on the wire only for legacy V1 (Hash) containers, so an absent version now correctly defaults to V1, matching the .NET/Java convention. This fixes Gateway 2.0 (thin-client) point-op routing for V1 containers, where the client-computed effective partition key previously used the wrong (V2) algorithm and stalled until timeout. The create path (PartitionKeyDefinition::new) is unchanged and still defaults to V2. (#4739) http://(non-HTTPS) account endpoints are now rejected unless the host is a known Cosmos DB emulator host (as determined by the existing emulator-host detection). The check runs inCosmosDriver::new(reached viaCosmosDriverRuntime::create_driver), so an invalid endpoint fails fast with aCLIENT_INVALID_ACCOUNT_ENDPOINT_URLerror before any network I/O. Both the primary endpoint and any backup endpoints are validated. (#4757)- Fixed
DiagnosticsContextdebug rendering to emit valid diagnostics JSON instead of Rust struct dumps that leaked internal timers, caches, and CPU monitor state. Debug rendering now uses the configured default diagnostics verbosity, which defaults to summary. (#4733) - Fixed a panic and incorrect results on cross-partition queries with a partition-key equality or
INpredicate (e.g.WHERE c.id IN (@a, @b)). The gateway query plan returns a closed point range[X, X]per value; the planner now normalizes each point to the half-open effective-partition-key window[X, successor(X))(right-padding to full partition-key width before incrementing, matching .NET) and routes it viapartitionkeyrangeid+start/end-epkwithx-ms-read-key-type: EffectivePartitionKeyRange, instead of collapsingmin == maxto an empty intersection. (#4638) - Fixed hierarchical-partition-key (HPK / MultiHash) queries emitting the wrong
x-ms-read-key-typefor effective-partition-key range-scoped requests. The driver sent the point valueEffectivePartitionKeyalongsidex-ms-start-epk/x-ms-end-epk, which the gateway rejects with400 "One of the input values is invalid"; it now sendsEffectivePartitionKeyRange. This enables filtered partition-key prefix queries (issue #4680) and fixes cross-partition queries over HPK containers failing with400 Bad Request(issue #4681). (#4729) - Fixed session-token parsing rejecting the
-1region-progress sentinel that multi-region accounts emit for regions with no local progress. Region LSNs in the version vector are now parsed as signed values, with-1(and any negative value) modeled as “no progress” instead of failing the whole token as malformed. This applies to all Session-consistency traffic (not just distributed transactions) and prevents otherwise-valid multi-region session tokens from being discarded. (#4702) - Fixed
AZURE_COSMOS_PPCB_*environment variables (including theAZURE_COSMOS_PPCB_ENABLEDmaster switch and theAZURE_COSMOS_PPCB_ENABLED_OVERRIDEkill switch) being silently ignored when a caller builtDriverOptionswithout callingDriverOptionsBuilder::with_partition_failover_options. The environment is read only byPartitionFailoverOptionsBuilder::build, but the omitted-options path used a barePartitionFailoverOptions::default()(which hard-codes PPCB enabled and reads no environment), so PPCB stayed on even withAZURE_COSMOS_PPCB_ENABLED=false.DriverOptionsBuilder::buildnow resolves the partition-failover options from the environment when the caller does not supply them (falling back to defaults, fail-soft, if an environment value is out of bounds). An explicitly suppliedPartitionFailoverOptionscontinues to take precedence. (#4655)
Features Added
- Added runtime diagnostics output configuration via
CosmosDriverRuntimeBuilder::with_diagnostics_options, including the env-backedAZURE_COSMOS_DIAGNOSTICS_DEFAULT_VERBOSITYoption. The built-in default is now summary diagnostics JSON. (#4733) - Added Gateway 2.0 transport (a regional proxy forwarding RNTBD-over-HTTP/2). Gateway 2.0 is used automatically when the account advertises thin-client endpoints, the connectivity probe confirms them, and the runtime has not opted out. (#4319, #4803)
- Added
ConnectionPoolOptions::gateway_v2_disabledandConnectionPoolOptionsBuilder::with_gateway_v2_disabled, withAZURE_COSMOS_CONNECTION_POOL_GATEWAY_V2_DISABLEDconfiguration and an environment-only_OVERRIDEincident switch. (#4763) - Added a retry policy for HTTP 449 (RetryWith): the driver retries in-region with exponential backoff (bounded by a ~30s budget) instead of failing over. Adds
CosmosStatus::is_retry_with()andFaultInjectionErrorType::RetryWith. (#4319) - Added per-partition hub region caching for read operations on PPAF-enabled single-master accounts. When the
x-ms-cosmos-hub-region-processing-onlylatch is set on a retry and a partition key range ID has been resolved, the driver now consults the per-partition failover cache (PartitionEndpointState::failover_overrides— the same map already used by per-partition automatic failover for writes) and routes directly to the cached hub endpoint, skipping the403/3 (WriteForbidden)discovery chain on subsequent operations for the same partition. (#4555) - Added preview distributed transaction driver models, request serialization, response parsing/reordering, strict session-token merge, DTX retry handling, diagnostics, and a baseline in-memory emulator
/operations/dtcpath behind the disabled-by-defaultpreview_dtxfeature. (#4702) - Added change feed support in the dataflow pipeline: a new
UnorderedMergenode fans a change feed read out across physical partitions and round-robins their pages, andCosmosOperation::change_feedbuilds incremental-feed operations with the appropriate wire headers. A new publicChangeFeedStartFromenum (Beginning,Now,PointInTime) records the feed’s original start position and is persisted in the continuation token so partitions never polled before a checkpoint re-apply it on resume instead of replaying history; set it viaCosmosOperation::with_change_feed_start. (#4621) - Added
TlsBackend(currentlyTlsBackend::Rustls, the default) and atls_backendoption onConnectionPoolOptions(ConnectionPoolOptionsBuilder::with_tls_backend/ConnectionPoolOptions::tls_backend), available under therustlsfeature. The driver asserts the selected backend on thereqwesttransport, giving a supported way to pin the TLS backend without direct transport access. This is additive and changes no behavior for the default (rustls-only) build, where reqwest already negotiates rustls; it only has an effect in builds that compile in multiple reqwest TLS backends (e.g.rustlsplusnative_tls, absent reqwest’shttp3feature), where reqwest would otherwise default to native-tls and the driver now pins rustls instead. (#4649)
Cosmos DB Client Driver 0.6.1 Changelog
Bugs Fixed
- Fixed partition-range discovery for containers whose routing metadata spans more than ten pages, added full-refresh recovery for invalid incremental maps, and prevented empty routing maps from remaining cached. (#4845)
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@0.37.0
$> cargo add azure_data_cosmos@0.37.1
$> cargo add azure_data_cosmos_driver@0.6.0
$> cargo add azure_data_cosmos_driver@0.6.1
Feedback
If you have a bug or feature request for one of the libraries, please post an issue to GitHub.