coderfender commented on code in PR #21030: URL: https://github.com/apache/datafusion/pull/21030#discussion_r3133138061
########## datafusion/ffi/README.md: ########## @@ -65,14 +65,39 @@ to work across Rust libraries. In general, you can use Rust's [FFI] to operate across different programming languages, but that is not the design intent of this crate. Instead, we are using external crates that provide stable interfaces that closely mirror the Rust native approach. To learn more -about this approach see the [abi_stable] and [async-ffi] crates. +about this approach see the [stabby] and [async-ffi] crates. If you have a library in another language that you wish to interface to DataFusion the recommendation is to create a Rust wrapper crate to interface with your library and then to connect it to DataFusion using this crate. Alternatively, you could use [bindgen] to interface directly to the [FFI] provided by this crate, but that is currently not supported. +## Stabby Usage + +This crate uses [stabby] for ABI-stable types like `stabby::string::String` and +`stabby::vec::Vec`. We chose stabby because [abi_stable] is no longer actively +maintained. + +We intentionally use `#[repr(C)]` for our struct definitions instead of stabby's +`#[stabby::stabby]` macro. The reason is that stabby's `IStable` trait (required +by the macro) demands that all inner types also implement `IStable`. This creates +challenges for our use case: Review Comment: Thank you for benchmarking builds. I did update documentation to reflect the design choices and removed mentions of `IStable` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
