Azure SDK for Rust (July 2026)
The Azure SDK team is pleased to announce our July 2026 client library releases.
9 packages released this month.
Stable Packages (4)
-
Core
-
Core - AMQP
-
TypeSpec Client Core
-
TypeSpec Core
Beta Packages (5)
-
Azure Storage SAS
-
Cosmos DB
-
Cosmos DB Client Driver
-
Cosmos DB SDK Macros
-
Storage - Blobs
Release highlights
Azure Storage SAS 0.1.0 Changelog
Features Added
- Initial supported release.
Core 1.1.0 Changelog
Features Added
Errornow captures astd::backtrace::Backtraceat construction time and includes it inDebugoutput (e.g.,{:?}) whenRUST_BACKTRACE=1is set.
Core - AMQP 1.1.0 Changelog
Features Added
- Added
AmqpSessionOptions::with_unbounded_windows(), a shared constructor that sets both session flow-control windows tou32::MAXfor messaging crates that rely on per-link credit for flow control.
Cosmos DB 0.36.0 Changelog
Breaking Changes
- Reorganized the public API: types are now grouped under
models,diagnostics,feed, andoptions; thequery,regions, androuting_strategymodules were removed; the previously#[doc(hidden)]feature-gated builder methods onCosmosClientBuilderare now visible (and remain feature-gated);PartitionKey::EMPTY, itsDefaultimpl, andFrom<()> for PartitionKeywere removed (use the query/feed APIs for cross-partition operations); andETagis no longer re-exported fromazure_data_cosmos::options— useazure_core::http::Etagdirectly (construct viaEtag::from(&str)/Etag::from(String)). See the PR for the full list of moves and import paths. (#4512) - Renamed
CosmosClientBuilder::with_operation_optionstoCosmosClientBuilder::with_default_operation_optionsto reflect the fact that it specifies defaults for per-operation options rather than actual client-level options. (#4588) TransactionalBatch::{create_item, upsert_item, replace_item}andTransactionalBatchOperationResult::into_modelnow returnazure_data_cosmos::Result<_>instead ofResult<_, serde_json::Error>. The underlyingresource_bodyis now stored asOption<Box<serde_json::value::RawValue>>and exposed via a newresource_body()accessor. (#4512)DatabaseProperties::idis nowOption<String>(previouslyString) to match the wire schema. (#4512)- Partition Circuit Breaker (PPCB) is now ENABLED by default. To disable it, set
PartitionFailoverOptions::circuit_breaker_enabledtofalsewhen configuring aCosmosClientor set theAZURE_COSMOS_PPCB_ENABLEDenvironment variable tofalse. (#4588) CosmosClientBuilderhas been slimmed to a runtime-aware surface. Per-runtime concerns (transport, cert validation, proxy, UA defaults) move ontoCosmosRuntimeand are shared across clients; per-client concerns (operation defaults, FI rules, throughput-control groups) stay on the builder (#4588). Migration impact:with_proxy_allowed— removed. Move toCosmosRuntimeBuilder::with_connection_pool(ConnectionPoolOptionsBuilder::new().with_proxy_allowed(true).build()).with_throttling_retry_options— removed. The throttle settings now live onOperationOptions; usewith_default_operation_options(OperationOptionsBuilder::new().with_throttling_retry_options(...).build())(or attach to aCosmosRuntimefor process-wide defaults).with_fault_injection— renamed towith_fault_injection_rulesand now returnsResult<Self>to surface duplicate-ID errors at registration time.with_throughput_control_group— renamed toregister_throughput_control_groupand now returnsResult<Self>. Throughput-control groups are now a per-client (driver-level) concept only;CosmosRuntimeBuilderdoes not expose a corresponding registration method.with_driver_runtime_builder— replaced bywith_runtime(CosmosRuntime). The__internal_in_memory_emulatorharness builds its runtime viaCosmosRuntimeBuilder::from(driver_builder)(theFrom<CosmosDriverRuntimeBuilder>escape hatch).- The
allow_invalid_certificatesCargo feature has been removed. The capability is now in the default feature set but requires explicit opt-in viaCosmosRuntimeBuilder::with_connection_pool(ConnectionPoolOptionsBuilder::new().with_server_certificate_validation(ServerCertificateValidation::RequiredUnlessEmulator).build()). The newRequiredUnlessEmulatorpolicy is not a blanket “disable validation” knob — it validates the server certificate normally and only relaxes validation for detected Cosmos DB emulator hosts (viaAccountEndpoint+Regionheuristics, or theAZURE_COSMOS_EMULATOR_HOSTenvironment variable). See the driver CHANGELOG for the underlyingEmulatorServerCertValidation→ServerCertificateValidationrename. - Per-account driver caching has been removed from the underlying runtime — each
CosmosClient::build(...)now constructs a freshCosmosDriver. Clients sharing the sameCosmosRuntimecontinue to share transport pools, sampler, account cache, etc.; only the per-accountCosmosDriverinstance is no longer reused. (#4588)
Features Added
- Derived
SafeDebugonCosmosCredential,ItemResponse,ResourceResponse<T>, andBatchResponse. (#4512) - Added standard derives (
Clone,Copy,PartialEq,Eq,Hash,Serialize,Deserialize) toConsistencyLevelandRoutingStrategy. (#4512) Query::with_textnow acceptsimpl Into<String>. (#4512)- Exposed
CosmosRuntimeand a runtime-awareCosmosClientBuilder, splitting the Cosmos client into a per-process runtime (transport / cert / proxy / UA defaults) and per-client driver (operation defaults, fault injection, throughput-control groups), and re-exporting the driver’s options surface fromazure_data_cosmos::options: - New
CosmosRuntimeandCosmosRuntimeBuildertypes. A default process-wide runtime is initialized lazily; users can configure their own runtime throughCosmosRuntimeBuilderand attach it viaCosmosClientBuilder::with_runtime. The runtime builder exposes: with_connection_pool(ConnectionPoolOptions)— runtime-wide transport / cert / proxy settings.with_default_operation_options(OperationOptions)— runtime-defaultOperationOptions.with_user_agent_suffix(UserAgentSuffix)— runtime-default User-Agent suffix.with_cpu_refresh_interval(Duration)— diagnostics sampler interval.build()— auto-applies anazsdk-rust-cosmos/<crate-version>wrapping SDK identifier so wire User-Agent strings always advertise the SDK alongside any custom suffix.- New per-client setters on
CosmosClientBuilder: with_runtime(CosmosRuntime)— attach an explicit runtime; when not set,build()resolvesCosmosRuntime::global()lazily.with_default_operation_options(OperationOptions)— client-level defaultOperationOptions(overrides runtime defaults; overridden by per-call options).with_partition_failover_options(PartitionFailoverOptions)— configures the driver’s per-partition circuit-breaker / failover tuning for this client; when unset, the driver falls back toPartitionFailoverOptions::default(), which honors theAZURE_COSMOS_PPCB_*environment variables.with_fault_injection_rules(Vec<Arc<FaultInjectionRule>>) -> Result<Self>— registers fault-injection rules on this specific client (gated onfault_injection).register_throughput_control_group(ThroughputControlGroupOptions) -> Result<Self>— registers a throughput-control group for this client’s driver.- New re-exports from
azure_data_cosmos::options(so users configuring a custom runtime don’t have to take a direct dependency on the driver crate):ConnectionPoolOptions,ConnectionPoolOptionsBuilder,ServerCertificateValidation,PartitionFailoverOptions,PartitionFailoverOptionsBuilder,ThroughputControlOptions,ThroughputControlOptionsBuilder, andThroughputControlOptionsView. - New nested
OperationOptions::throughput_controlgroup lets callers setthroughput_bucketandpriority_levelper request without first registering a throughput-control group; registered groups are still consulted as fallbacks throughThroughputControlOptions::group_name. (See the driver CHANGELOG for the full per-field layering and header-emission rules.)
Bugs Fixed
403/1008 (DatabaseAccountNotFound)and403/3 (WriteForbidden)now trigger an account-topology refresh and retry against the refreshed endpoints instead of bubbling up. (#4590)- Gateway-mode transport connect failures no longer bump the per-partition circuit breaker counter; only the endpoint-unavailable mark is emitted. (#4590)
403/3 (WriteForbidden)and403/1008 (DatabaseAccountNotFound)on a PPCB-managed multi-write partition no longer mark the endpoint unavailable; the per-partition counter drives failover so other partitions on the same endpoint keep writing normally. (#4590)- The per-partition circuit breaker override now respects
OperationOptions::excluded_regions; previously a tripped override could silently route to a region the caller had excluded. (#4590)
Cosmos DB Client Driver 0.5.0 Changelog
Breaking Changes
- Cross-partition query continuation tokens minted by
0.4.0cannot be resumed against0.5.0. The on-wire token shape was reshaped to record per-range sibling state so that pausing a fan-out query mid-flight preserves information about siblings that hadn’t been touched yet. Callers holding a0.4.0-minted token will receive a continuation-token error on resume and must re-issue the query. (#4550) azure_data_cosmos_driver::models::ETaghas been removed. Useazure_core::http::Etagdirectly. The previousETag::new(...)is gone; construct viaEtag::from(&str)/Etag::from(String). (#4512)- Migration impact of the client / runtime options restructure. Per-runtime concerns (transport, cert validation, proxy, UA defaults) are configured once on the
CosmosDriverRuntime; per-client concerns (operation defaults, FI rules, throughput-control groups, partition-failover tuning) move ontoDriverOptions(#4588): - Runtime-builder rename:
CosmosDriverRuntimeBuilder::with_operation_options→with_default_operation_options(and the matching accessor onCosmosDriverRuntime). Update direct driver consumers accordingly. - Per-account driver cache removed.
CosmosDriverRuntime::get_or_create_driveris nowcreate_driverand always returns a freshArc<CosmosDriver>. Driver sharing is the consumer’s responsibility (the SDK shares the runtime across clients via the newCosmosClientBuilder::with_runtime). - Fault injection moves to the driver. Removed
CosmosDriverRuntime{,Builder}::with_fault_injection_rulesand the runtime-timeFaultInjectingFactorywrap (gated on thefault_injectionfeature). Configure fault injection per-driver viaDriverOptionsBuilder::with_fault_injection_rules. Each driver wraps the runtime’s HTTP client factory if and only if its ownDriverOptionscarries rules; bootstrap transport is never wrapped. - Throughput-control groups are now driver-only. Removed
CosmosDriverRuntime::get_throughput_control_group,get_default_throughput_control_group, and the runtime-level registry entirely (includingCosmosDriverRuntimeBuilder::register_throughput_control_group). Register groups viaDriverOptionsBuilder::register_throughput_control_group. OperationOptions::throughput_control_groupremoved. Configure per-operation throughput-control bucket / priority headers via the new nestedOperationOptions::throughput_controlgroup (ThroughputControlOptions): setgroup_nameto reference a registered group, or setthroughput_bucket/priority_leveldirectly to override the wire headers without registering a group. The driver-side resolverCosmosDriver::effective_throughput_control_grouphas been renamed toeffective_throughput_controland now returns the resolved header inputs (ResolvedThroughputControl) instead ofOption<ThroughputControlGroupSnapshot>; the implicit “default group for container” fallback on the request path was removed.- Removed the seven per-partition / hedging fields from
OperationOptions:circuit_breaker_failure_count_for_reads,circuit_breaker_failure_count_for_writes,circuit_breaker_timeout_counter_reset_window_in_minutes,allowed_partition_unavailability_duration_in_seconds,ppcb_stale_partition_unavailability_refresh_interval_in_seconds,per_partition_circuit_breaker_enabled, andconsecutive_hedge_win_threshold. These were never resolved per-operation; configure them via the newDriverOptionsBuilder::with_partition_failover_options(PartitionFailoverOptions)instead. - TLS cert-validation type renamed:
EmulatorServerCertValidation→ServerCertificateValidation, with reshaped variantsEnabled/DangerousDisabled→Required/RequiredUnlessEmulator. The newRequiredUnlessEmulatorpolicy is not a blanket “disable validation” knob — it validates the server certificate normally and only relaxes validation when the connection target is identified as a Cosmos DB emulator (viaAccountEndpoint+Regionhost heuristics, or theAZURE_COSMOS_EMULATOR_HOSTenvironment variable).Requiredalways validates and is the new default. TheFrom<bool>/Into<bool>conversions on the enum were removed (the semantics no longer map to a single boolean). OnConnectionPoolOptions, theemulator_server_cert_validationfield/accessor and theConnectionPoolOptionsBuilder::with_emulator_server_cert_validationsetter were renamed toserver_certificate_validation/with_server_certificate_validation. - Partition-failover environment variables consolidated under the
AZURE_COSMOS_PPCB_*prefix (with a_MSsuffix on duration knobs): AZURE_COSMOS_PER_PARTITION_CIRCUIT_BREAKER_ENABLED→AZURE_COSMOS_PPCB_ENABLEDAZURE_COSMOS_CIRCUIT_BREAKER_FAILURE_COUNT_FOR_READS→AZURE_COSMOS_PPCB_READ_FAILURE_THRESHOLDAZURE_COSMOS_CIRCUIT_BREAKER_FAILURE_COUNT_FOR_WRITES→AZURE_COSMOS_PPCB_WRITE_FAILURE_THRESHOLDAZURE_COSMOS_CIRCUIT_BREAKER_TIMEOUT_COUNTER_RESET_WINDOW_IN_MINUTES→AZURE_COSMOS_PPCB_COUNTER_RESET_WINDOW_MSAZURE_COSMOS_ALLOWED_PARTITION_UNAVAILABILITY_DURATION_IN_SECONDS→AZURE_COSMOS_PPCB_PARTITION_UNAVAILABILITY_DURATION_MSAZURE_COSMOS_PPCB_STALE_PARTITION_UNAVAILABILITY_REFRESH_INTERVAL_IN_SECONDS→AZURE_COSMOS_PPCB_FAILBACK_SWEEP_INTERVAL_MSAZURE_COSMOS_CONSECUTIVE_HEDGE_WIN_THRESHOLD→AZURE_COSMOS_PPCB_CONSECUTIVE_HEDGE_WIN_THRESHOLD
Features Added
- Added support for using a native query planning library to generate query plans locally, avoiding a Gateway round-trip on cross-partition queries. Gated behind the
__internal_native_query_planfeature flag. (#4554) - Restructured the client / runtime options layering on the driver. Two new nested option groups, a per-client overrides surface on
DriverOptionsBuilder, and a single canonicalAZURE_COSMOS_PPCB_*namespace for partition-failover environment variables. The driver now consumes partition-failover configuration once at construction (CosmosDriver::newno longer fabricates anOperationOptionsViewoutside any operation context) (#4588): - Added new nested
OperationOptions::throughput_controlgroup (ThroughputControlOptions/…Builder/…View, mirroring theThrottlingRetryOptionspattern). Exposes three layered fields (#4588): group_name: Option<ThroughputControlGroupName>— replaces the old top-levelOperationOptions::throughput_control_group.throughput_bucket: Option<u32>— direct override for thex-ms-cosmos-throughput-bucketheader, overrides the value specified by the group if present.priority_level: Option<PriorityLevel>— direct override for thex-ms-cosmos-priority-levelheader, overrides the value specified by the group if present.- Added new client-level
PartitionFailoverOptions/PartitionFailoverOptionsBuilder, attached toDriverOptionsviaDriverOptionsBuilder::with_partition_failover_options. Mirrors theConnectionPoolOptionsshape (private fields, public getters, env-var-awareDefault). Every env-driven field uses theAZURE_COSMOS_PPCB_*prefix (with a_MSsuffix on duration knobs), giving the PPCB family a single, discoverable namespace. - Added new per-driver overrides on
DriverOptionsBuilder: with_user_agent_suffix(UserAgentSuffix)— overrides the runtime’s default User-Agent suffix for this driver. The runtime continues to precompute its ownArc<UserAgent>; drivers with no override clone thatArc(no per-request UA recomputation), drivers with an override compute their ownUserAgentonce at construction.with_fault_injection_rules(Vec<Arc<FaultInjectionRule>>) -> Result<Self>— registers fault-injection rules at the driver level (gated on thefault_injectionfeature). Rejects duplicate rule IDs.register_throughput_control_group(ThroughputControlGroupOptions) -> Result<Self>— registers a throughput-control group for this driver. Throughput-control groups are now a driver-only concept; the per-runtime registry has been removed.
Bugs Fixed
- Fixed account-level regional endpoints failing back into the routing rotation on a time-based cooldown alone, with no connectivity check. A firewall-blocked endpoint would rejoin rotation once its unavailability TTL elapsed, fail to connect, and be re-marked unavailable — a sustained low-throughput loop. A background probe loop now gates failback: an unavailable endpoint only rejoins rotation after a lightweight
GET /probeconnectivity check confirms it is reachable; otherwise its cooldown is reset and it stays out of rotation. (#4604) 403/1008 (DatabaseAccountNotFound)now drives an account-topology refresh and a retry against the refreshed endpoint set (paced at 1 s, bounded by the backend-failover retry budget) on both single-master and multi-master accounts instead of bubbling up.403/3 (WriteForbidden)gets the same backend-failover treatment on multi-master accounts; single-master 403/3 still uses the generic failover budget (no delay) pending the upcoming single-master DR drill. Whenis_ppcb_managedis true, the per-partition mark and topology refresh fire butMarkEndpointUnavailableis suppressed so PPCB drives failover per partition. (#4590)evaluate_transport_layer_outcome’sdefinitely_not_sentbranch now emits onlyMarkEndpointUnavailable(theMarkPartitionUnavailableemit was dropped) so Gateway-mode connect failures stop inflating per-partition PPCB counters. (#4590)try_handle_write_forbiddennow suppressesMarkEndpointUnavailablewhenis_ppcb_managedis true (multi-write + partitioned + PPCB active); the per-partition mark and topology refresh still fire. (#4590)ppcb_should_skipinresolve_endpointnow treatsOperationOptions::excluded_regionsas a hard filter on the PPCB override path; previously the override fast-path bypassed the exclusion check enforced intry_select_endpoint. (#4590)- Fixed duplicate items being returned on cross-partition query resume after a physical partition split. When a cross-partition query was paused, serialized to a continuation token, and resumed after the underlying partition had split, the resumed iterator could re-emit items the caller had already consumed on a prior page. The continuation token now records per-range sibling state and is correctly propagated to every surviving leaf after a split. (#4550)
- Fixed per-attempt
activity_idin diagnostics serializing asnullon transport failures; it is now seeded from the operation-level activity ID. (#4602) - Fixed
system_usage.cpuin diagnostics emitting the literal string"empty"; it now serializes as a structured{ samples, status }object when no CPU samples are available. (#4602)
Cosmos DB SDK Macros 0.2.0 Changelog
Features Added
- Added an
overridablefield-level flag (#[option(env = "...", overridable)]) that recognizes a{ENV}_OVERRIDEkill-switch environment variable, generatesfrom_env_override()/from_env_override_vars()parsing, and adds a top-priorityenv_overridelayer to the generated View (constructed vianew_with_override). (#4562) - Added an
#[options(env_only)]struct-level mode toCosmosOptionsthat generates only thefrom_env()/from_env_vars()constructors (no View, Builder, orDefault), allowing an existing builder-style type to double as its own environment-variable source. (#4562) - Added a
parserfield-level attribute (#[option(env = "...", parser = path::to::fn)]) toCosmosOptionsthat parses an environment variable with a customfn(&str) -> Option<T>instead ofFromStr, supporting field types without a suitableFromStr(such as aDurationread from a millisecond count). ANoneresult is logged and ignored, matching the lenient built-in parsers. (#4562)
Storage - Blobs 1.1.0-beta.1 Changelog
Features Added
- Added
BlobServiceClient::get_user_delegation_key()to obtain a user delegation key for creating user delegation SAS tokens. - Added support for
list_blobs_hierarchicaltoBlobContainerClient. - Added support for
list_page_rangestoPageBlobClient. - Added support for
download_intotoBlobClientwhich enables downloads to write blob contents directly into a caller-provided buffer.
TypeSpec Client Core 1.1.0 Changelog
Features Added
Errornow captures astd::backtrace::Backtraceat construction time and includes it inDebugoutput (e.g.,{:?}) whenRUST_BACKTRACE=1is set.
TypeSpec Core 1.1.0 Changelog
Features Added
Errornow captures astd::backtrace::Backtraceat construction time and includes it inDebugoutput (e.g.,{:?}) whenRUST_BACKTRACE=1is set.
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_core@1.1.0
$> cargo add azure_core_amqp@1.1.0
$> cargo add azure_data_cosmos@0.36.0
$> cargo add azure_data_cosmos_driver@0.5.0
$> cargo add azure_data_cosmos_macros@0.2.0
$> cargo add azure_storage_blob@1.1.0-beta.1
$> cargo add azure_storage_sas@0.1.0
$> cargo add typespec@1.1.0
$> cargo add typespec_client_core@1.1.0
Feedback
If you have a bug or feature request for one of the libraries, please post an issue to GitHub.