Repository navigation
Import core Rust bindings and C ABI simulator support - #14187
Draft
tclinkenbeard-oai wants to merge 11 commits into
Draft
tclinkenbeard-oai wants to merge 11 commits into
tclinkenbeard-oai wants to merge 11 commits into
Conversation
Source: https://github.com/foundationdb-rs/foundationdb-rs, upstream main snapshot dated September 25, 2026. Preserve the upstream crates, tests, examples, history logs, and dual MIT/Apache-2.0 licenses. Omit repository-specific hosted automation and agent configuration.
Add opt-in CMake targets using the in-tree C client and generated headers/options, register and package the Rust binding tester, add Cargo checks, and document the imported API compatibility and release boundaries.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
FYI @PierreZ I can't add you as a reviewer, but this is the PR we discussed a few months ago |
Contributor
|
Yeah I remember! I'm not sure how the contribution would be with a community-based bindings. Especially when I personally added some experimental stuff in it! Any thoughts? |
This comment has been minimized.
This comment has been minimized.
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
This comment has been minimized.
This comment has been minimized.
Contributor
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
This comment has been minimized.
This comment has been minimized.
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS 14.x
|
This comment has been minimized.
This comment has been minimized.
This branch has not been deployed
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.
Import the core Rust bindings from the
foundationdb-rssnapshot recorded inbindings/rust/UPSTREAM.md, preserving historical client headers/options, attribution, and the MIT/Apache-2.0 licenses. The workspace contains the client, C bindings, option generator, tuple, macros, shared bindingtester, and an optional C-ABI simulator adapter.BUILD_RUST_BINDING=ONbuilds against the in-tree C client, generated headers, and canonicalfdb.options. Rust participates in the shared scripted and randomized binding tests, including API and directory comparisons with Python, subject to its advertised capabilities. Scripted tests select the newest common supported API; randomized tests sample supported versions. It currently supports client APIs through 740; API 800/native CDC wrappers and directory snapshot operations are outside this import. Historical client snapshots remain available for standalone Cargo builds.The client retains native transactions/retries, tuple/subspace/directory support, mapped ranges, and focused API examples. Native
on_errorhandles backoff and retry limits; wrapped errors retain their type and commit uncertainty remains cumulative. Application recipes, accounting/budget/reporting, custom retry-policy/hooks, profiling, Timekeeper utilities, and their application examples are excluded.Alongside
BUILD_RUST_BINDING=ON,BUILD_RUST_SIMULATION=ONenables minimal simulator support using the canonicalCWorkload.h, with noop, shared-future, and atomic examples. The adapter retains owner-thread scheduling, cancellation, borrowed database ownership, context lifetime guards, and callback metric lifetimes. The legacy C++ bridge/private headers, tracing integration crate, Nix environment, and old Docker/campaign tooling are excluded. The shared C client exposes its selected API pair so compatible Rust libraries can initialize safely in one process without taking ownership of the simulator network.Validation on Linux with Rust 1.85.1:
noop(seed 14187) andshared(seed 14188) passed with buggify disabled.The draft retains one unresolved simulator runtime limitation:
atomicstill crashes at seed 14189 with buggify disabled. Debugger replay stops infdb_database_create_transactionafter an awaited commit, matching the previously reported failure. Its fault workloads and correctness checks remain intact. This trim does not claim complete simulator runtime compatibility. macOS runtime behavior and native distribution packaging/publishing remain unvalidated or follow-up work.