Extract FFI bindings into separate libublk-rs-sys crate#46
Merged
Conversation
Create a standalone libublk-rs-sys crate containing low-level FFI bindings to the Linux ublk kernel API. This allows users to handle ublk operations on their own io_uring instance instead of using libublk's thread-local ring. Changes: - Move build.rs and ublk_cmd.h to libublk-rs-sys/ - Create libublk-rs-sys with its own Cargo.toml and documentation - Update main libublk to depend on libublk-rs-sys via path dependency - Remove build-dependencies from main Cargo.toml - Update src/sys.rs to re-export from libublk-rs-sys - Update .gitignore to exclude build artifacts in subdirectories - Move ublk_auto_buf_reg helper functions to libublk-rs-sys with tests The ublk_sqe_addr_to_auto_buf_reg() and ublk_auto_buf_reg_to_sqe_addr() helper functions are now part of the libublk-rs-sys API with comprehensive documentation and unit tests. The main crate re-exports them for backward compatibility. The crates are managed separately (not using workspace) following the pattern of similar projects like devicemapper-rs. Resolves: #45 Signed-off-by: Ming Lei <tom.leiming@gmail.com>
16b583b to
c6a3e06
Compare
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.
Create a standalone libublk-rs-sys crate containing low-level FFI bindings to the Linux ublk kernel API. This allows users to handle ublk operations on their own io_uring instance instead of using libublk's thread-local ring.
Changes:
The crates are managed separately (not using workspace) following the pattern of similar projects like devicemapper-rs.
Resolves: #45