Skip to content

Rust: Split adbc_core into several crates #3106

@eitsupi

Description

@eitsupi

What feature or improvement would you like to see?

As pointed out by @lidavidm1, splitting the adbc_core crate seems worthwhile for a better separation of concerns.

Considering the use cases for our current Rust drivers, I believe splitting the crate into the following three components would clarify dependencies and effectively isolate unsafe code.

  1. adbc_core: This crate would represent the C API specification (The current rust/core/src/ffi/constants.rs) and the ADBC behavior purely in Rust. For crates written purely in Rust, like adbc_datafusion, this would be sufficient, excluding the export_driver macro.
  2. adbc_ffi: This crate would depend on adbc_core and implement the unsafe functions. The export_driver macro definition is also included.
  3. adbc_driver_manager: This crate would depend on adbc_ffi and provide the functionality currently found in rust/core/src/driver_manager.rs. Rust-written drivers like adbc_datafusion would not need to depend on this crate.

I'd appreciate your feedback on this proposal.

Footnotes

  1. https://github.com/apache/arrow-adbc/issues/2739#issuecomment-2976726395

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions