databricks/zerobus-sdk rust/v2.0.0
databricks/zerobus-sdk
Captured source
source ↗Rust SDK v2.0.0
Repository: databricks/zerobus-sdk
Tag: rust/v2.0.0
Published: 2026-05-14T13:44:13Z
Prerelease: no
Release notes:
New Features and Improvements
- Arrow Flight ingestion promoted to Beta: The
arrow-flightfeature
(ZerobusArrowStream, ArrowStreamConfigurationOptions, and related types) is no longer labelled experimental/unsupported. The API is stabilising but may still change before reaching GA.
- Arrow schema from UC schema (feature
arrow-flight):
schema::arrow_schema_from_uc_columns and schema::arrow_schema_from_uc_schema build an arrow_schema::Schema directly from Unity Catalog metadata, parallel to the existing descriptor_from_uc_* functions. Emits native Arrow types (Date32, Timestamp(Microsecond, ..), LargeUtf8, LargeBinary, Map("entries", Struct{keys,values})) matching the canonical Arrow schema the Databricks Arrow Flight server builds from Delta.
- `ZerobusSdkBuilder::application_name`: Set a custom application identifier
appended to the HTTP user-agent header (sent on the underlying tonic Endpoint) on every request. The default zerobus-sdk-rs/ prefix is preserved for server-side telemetry, so the wire value becomes zerobus-sdk-rs/ . The previous x-zerobus-sdk gRPC metadata header is no longer emitted; downstream consumers that parsed it should switch to reading user-agent.
- `ZerobusSdkBuilder::sdk_identifier`: Override the SDK prefix of the
HTTP user-agent header, replacing the default zerobus-sdk-rs/. Intended for wrapper SDKs that need to replace the SDK identification; most callers should prefer application_name, which preserves the SDK version prefix. When both are set, application_name is still appended, so the wire value becomes .
Bug Fixes
- Corrected the values returned by the C FFI
zerobus_get_default_config()
for callback_max_wait_time_ms / has_callback_max_wait_time_ms. The function previously reported 0 / false (i.e., "no callback timeout"), while the actual Rust SDK default is Some(5000ms). The C-side defaults now correctly mirror the Rust defaults (5000 / true).
Documentation
- Updated
rust/README.md,rust/examples/README.md,
rust/examples/json/README.md, and rust/examples/proto/README.md to remove all references to the deleted future-based APIs. The "Future-based API (Deprecated)" example sections and the deprecated method entries in the API Reference were removed.
- Added an Arrow Flight example under
examples/arrow/(example_arrow)
demonstrating both ingest_batch (RecordBatch) and ingest_ipc_batch (Arrow IPC bytes).
Internal Changes
- Consolidated Cargo workspace dependencies under
[workspace.dependencies]
in rust/Cargo.toml; member crates now use dep.workspace = true so versions are pinned in one place.
- Collapsed the four example packages (
example_json_{single,batch},
example_proto_{single,batch}) into two packages, rust-examples-json and rust-examples-proto, each exposing two [[example]] targets. Examples are invoked as cargo run -p rust-examples-json --example json_{single,batch} and cargo run -p rust-examples-proto --example proto_{single,batch}.
- Bumped
prostandprost-typesfrom 0.13 to 0.14;prost-reflectfrom
0.14 to 0.16. Public APIs that name prost::Message (e.g. ProtoMessage) now require callers to use prost 0.14 messages.
- Bumped
tonicfrom 0.13 to 0.14. The 0.14 release splits code generation
into separate crates: build-time codegen now uses tonic-prost-build (replacing tonic-build), and the runtime depends on the new tonic-prost crate for the prost codec. sdk/build.rs, tests/build.rs, and tools/generate_files/src/generate.rs were updated accordingly.
- Bumped Arrow crates (
arrow-flight,arrow-array,arrow-schema,
arrow-ipc) from 56.2.0 to 58.2. Switched IpcDataGenerator::encoded_batch to the non-deprecated encode API which takes an explicit CompressionContext.
- Raised minimum-version floors on several non-breaking dependencies to
current latest minor: tokio 1.42 → 1.52, tokio-stream 0.1.16 → 0.1.18, tokio-util 0.7.17 → 0.7.18, once_cell 1.19 → 1.21, bytes 1 → 1.11, tempfile 3.21 → 3.27, clap 4 → 4.6, urlencoding 2 → 2.1.
- Migrated the FFI and JNI crates off the deleted stream-creation methods.
Both wrappers now build streams via StreamBuilder. Default config in zerobus_get_default_config() / zerobus_arrow_get_default_config() now reads stream_options::defaults::* constants directly instead of constructing *ConfigurationOptions (no longer needed at the FFI layer). No C ABI or JNI signature changes.
- FFI and JNI no longer construct
StreamConfigurationOptions/
ArrowStreamConfigurationOptions. They read C/Java struct fields directly and apply each via builder setters.
Breaking Changes
- Removed
ZerobusSdk::create_stream()(in deprecation since v1.3.0).
Use sdk.stream_builder().table(name).oauth(id, secret).json() / .compiled_proto(desc).build().await instead. Removed from all examples, documentation, and tests.
- Removed
ZerobusSdk::create_stream_with_headers_provider()(in
deprecation since v1.3.0). Use sdk.stream_builder().table(name).headers_provider(p).json() / .compiled_proto(desc).build().await instead. Removed from all examples, documentation, and tests.
- Removed
ZerobusSdk::create_arrow_stream()*(featurearrow-flight)*
(in deprecation since v1.3.0). Use sdk.stream_builder().table(name).oauth(id, secret).arrow(schema).build_arrow().await instead. Removed from all examples, documentation, and tests.
- Removed
ZerobusSdk::create_arrow_stream_with_headers_provider()
*(feature arrow-flight)* (in deprecation since v1.3.0). Use sdk.stream_builder().table(name).headers_provider(p).arrow(schema).build_arrow().await instead. Removed from all examples, documentation, and tests.
- Removed
ZerobusStream::ingest_record()(in deprecation since v0.4.0).
Use stream.ingest_record_offset(payload).await? followed by stream.wait_for_offset(offset).await? to wait for acknowledgment. Removed from all examples, documentation, and tests.
- Removed
ZerobusStream::ingest_records()(in deprecation since v0.4.0).
Use stream.ingest_records_offset(payloads).await? followed by stream.wait_for_offset(offset).await?. Removed from all examples, documentation, and tests.
- Removed
ZerobusSdk::new()(in deprecation since v0.5.0). Use...
Excerpt shown — open the source for the full document.