Rust bindings v1 - #284
Open
Choochmeque wants to merge 91 commits into
Open
Conversation
…xample, because it should be reusable-action)
…is, and move_data
… fdb-sys and fdb crates
…r archiving functionality
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #284 +/- ##
===========================================
- Coverage 71.15% 71.05% -0.11%
===========================================
Files 370 370
Lines 23455 23455
Branches 2463 2463
===========================================
- Hits 16690 16666 -24
- Misses 6765 6789 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust FDB bindings to use the higher-level eckit/metkit Rust crates directly (instead of a custom Request/DataReader layer), and adapts downstream tools/tests/examples to the new API shape.
Changes:
- Replace
fdb::Requestwithmetkit::MarsRequestand migrate call sites accordingly. - Replace the custom
DataReaderwitheckit::DataHandle+open_for_read()for streaming reads. - Introduce
UserConfigand new C++ bridge plumbing (includingMessageArchiver) and updatefdb-hammerto match.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/Cargo.toml | Switch workspace deps to local-path eckit/metkit/bindman sources (currently non-reproducible). |
| rust/tools/fdb-hammer/src/main.rs | Migrate hammer to metkit::CodesHandle, metkit::MarsRequest, and new Fdb::open signature. |
| rust/tools/fdb-hammer/README.md | Update runtime instructions for hammer (RPATH/env-var guidance text). |
| rust/tools/fdb-hammer/Cargo.toml | Add eckit/metkit deps; add build-dep for rpath helper. |
| rust/tools/fdb-hammer/build.rs | Emit RPATH entries for runtime shared-library discovery. |
| rust/crates/fdb/src/lib.rs | Public API re-exports updated: remove Request/DataReader, add UserConfig/MessageArchiver. |
| rust/crates/fdb/src/handle.rs | Core API updated to accept metkit::MarsRequest and return eckit::DataHandle; add MessageArchiver. |
| rust/crates/fdb/src/options.rs | Add UserConfig overlay config type and conversion into eckit::Config. |
| rust/crates/fdb/src/error.rs | Simplify error mapping to wrap eckit::Error directly. |
| rust/crates/fdb/src/request.rs | Remove custom Request wrapper implementation. |
| rust/crates/fdb/src/datareader.rs | Remove custom DataReader wrapper implementation. |
| rust/crates/fdb/README.md | Document downstream binary RPATH handling via bindman_utils::emit_rpaths(). |
| rust/crates/fdb/build.rs | Change build-script behavior to re-export dependency root metadata. |
| rust/crates/fdb/Cargo.toml | Update crate metadata/deps to include eckit/metkit, adjust links. |
| rust/crates/fdb/examples/fdb_retrieve.rs | Update example to parse requests via metkit and read via DataHandle. |
| rust/crates/fdb/examples/fdb_read.rs | Update example to parse requests via metkit and stream via DataHandle. |
| rust/crates/fdb/examples/fdb_list.rs | Update example to parse requests via metkit and call Fdb::list with MarsRequest. |
| rust/crates/fdb/examples/fdb_axes.rs | Update example to parse requests via metkit and call Fdb::axes with MarsRequest. |
| rust/crates/fdb/examples/fdb_archive.rs | Update example to open config via eckit::Config::from_path. |
| rust/crates/fdb/benches/fdb_bench.rs | Update benchmarks to build MarsRequest and initialise eckit where needed. |
| rust/crates/fdb/tests/fdb_integration.rs | Update integration tests to use eckit::Config, MarsRequest, and DataHandle IO. |
| rust/crates/fdb/tests/fdb_async.rs | Update async tests to build MarsRequest from Key and read via DataHandle. |
| rust/crates/fdb/tests/fdb_thread_safety.rs | Update thread-safety tests to new request type and config handling (currently non-hermetic). |
| rust/crates/fdb-sys/src/lib.rs | Rework CXX interface: take MarsRequestWrapper and ConfigWrapper; return DataHandleWrapper. |
| rust/crates/fdb-sys/cpp/fdb_bridge.h | Update bridge header to include metkit/eckit wrapper headers; add MessageArchiver wrappers. |
| rust/crates/fdb-sys/cpp/fdb_bridge.cpp | Implement new bridge functions for list/retrieve/axes/etc using MarsRequestWrapper. |
| rust/crates/fdb-sys/build.rs | Generate exception bridge; update include/link metadata and vendored/system build logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Choochmeque
marked this pull request as ready for review
June 23, 2026 23:52
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.
Description
Use eckit high-level crate
Contributor Declaration
By opening this pull request, I affirm the following:
🌈🌦️📖🚧 Documentation FDB 🚧📖🌦️🌈
https://sites.ecmwf.int/docs/fdb/pull-requests/PR-284