feat: support RDB v14 (Array, stream XNACK) via librdb v2.3.0#1
Merged
Conversation
Bump bundled librdb v2.2.0 -> v2.3.0 and surface the new RDB v14 Level2 callbacks through the safe wrapper: - DataType::Array + handle_array_metadata / handle_array_element - handle_stream_nack_zone_entry (XNACK / NACK-zone entries) Notable changes: - Regenerate bindgen FFI bindings; fix update-bindings.sh to run under the pinned bindgen 0.71.1 (drop invalid --with-derive-debug; move -I args after --). - bindgen mistypes RDB_ARRAY_INSERT_IDX_NONE (UINT64_MAX) as i32 = -1; blocklist it and hand-declare the correct u64 const in librdb-sys/lib.rs. The trampoline maps the sentinel to insert_idx: Option<u64>. - build.rs unchanged: parser.c has an #ifndef LIBRDB_GIT_COMMIT fallback, so the cc-crate build is unaffected by upstream Makefile-only git-hash tracking. - Mark DataType #[non_exhaustive] so future RDB types stay non-breaking. - Add integration tests against the new v14 fixtures (array + stream_xnack), incl. the u64::MAX-1 insert-idx boundary that guards the sentinel mapping. Versions: librdb-sys 0.1.0+2.2.0 -> 0.2.0+2.3.0; librdb 0.1.1 -> 0.2.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
librdb-sys vendors deps/redis sources under BSD-3-Clause (Redis core), BSD-2-Clause (lzf), and Zlib (crcspeed) in addition to the MIT crate/librdb code. Replace the inaccurate `license = "MIT"` with the full SPDX expression so license scanners see the bundled licenses. sha256 is public-domain (no obligation); all upstream file headers are retained for attribution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follows the librdb v2.3.0 release (2026-06-03), which adds RDB v14 support. Bumps the vendored submodule v2.2.0 → v2.3.0 and surfaces the new Level2 callbacks through the safe wrapper.
Upstream v2.3.0 adds (PRs #98, #100, #95):
RDB_TYPE_ARRAY, sparse array)RDB_TYPE_STREAM_LISTPACKS_5)Changes
librdb-sys/librdbv2.2.0 → v2.3.0types.rsDataType::Array(+#[non_exhaustive])handlers.rshandle_array_metadata,handle_array_element,handle_stream_nack_zone_entry(default no-op)trampoline.rsbuild_callbackswiringtests/level2.rslibrdb-sys0.1.0+2.2.0 → 0.2.0+2.3.0;librdb0.1.1 → 0.2.0Notable decisions
build.rsneeds no change. PR #95's git-hash is a Makefile-Dflag, but we build with thecccrate.parser.chas an#ifndef LIBRDB_GIT_COMMIT … "unknown"fallback, so compilation is unaffected. No new source files or deps were added upstream.insert_idx→Option<u64>. librdb encodes "no insert cursor" asRDB_ARRAY_INSERT_IDX_NONE(UINT64_MAX). bindgen mis-evaluates that#defineasi32 = -1, so the var is blocklisted and re-declared with correct width (u64) inlibrdb-sys/src/lib.rs; the trampoline maps the sentinel toNone. Thearray_v14_insert_idx_boundaryfixture (u64::MAX - 1) guards against an off-by-one.update-bindings.shfixed. It couldn't run under the pinned bindgen 0.71.1 (invalid--with-derive-debug;-Iclang args before--). The documented regeneration workflow now works and reproducesbindings.rsbyte-for-byte.#[non_exhaustive]onDataType— RDB gains data types across versions; this keeps future additions non-breaking. The breaking enum-variant addition is reflected in thelibrdb0.2.0 minor bump.Out of scope (pre-existing, not part of the version follow)
handle_hash_field's raw-1sentinel (predates this; unifying toOptionis a separate breaking change).pre-commit-config.yaml's clippy hook uses--all-features, which tripsbuild.rs's mutually-exclusive linking-feature guard — broken independently of this PRTesting
cargo build✓ ·cargo test --all→ 26 passed ✓ ·cargo clippy --all-targets -- -D warnings✓ ·cargo fmt --check✓array_v14_*.rdb,stream_v14_xnack.rdb) and assert counts, ascending-idx ordering, value bytes, the insert-idx sentinel boundary, and NACK-zone IDs.Review
Reviewed by three independent adversarial agents (FFI/safety, API design/semver, build/bindings/completeness). Round 1 surfaced a mistyped public constant, a
DataTypesemver gap, and a stale README; all were fixed. Round 2: all three APPROVE (95% / 98% / 99%) — bindings reproducibility and a standalone out-of-tree packaged-crate build were verified.🤖 Generated with Claude Code