Skip to content

refactor(rust/ffi): make fields of FFI structs public#3553

Merged
lidavidm merged 1 commit intoapache:mainfrom
lidavidm:gh-3552
Oct 10, 2025
Merged

refactor(rust/ffi): make fields of FFI structs public#3553
lidavidm merged 1 commit intoapache:mainfrom
lidavidm:gh-3552

Conversation

@lidavidm
Copy link
Member

@lidavidm lidavidm commented Oct 9, 2025

Closes #3552.

@lidavidm
Copy link
Member Author

lidavidm commented Oct 9, 2025

CC @eitsupi

@lidavidm lidavidm marked this pull request as ready for review October 9, 2025 03:45
@lidavidm lidavidm requested a review from wjones127 as a code owner October 9, 2025 03:45
@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Oct 9, 2025
Copy link
Member

@mbrobbel mbrobbel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making all fields pub, maybe we should add methods that enable you to do what you want? With methods we can check invariants and prevent users from accidentally doing the wrong thing.

@lidavidm
Copy link
Member Author

lidavidm commented Oct 9, 2025

This is already the FFI/unsafe layer, though. I don't think there's value in investing into a lot of abstraction when it's not clear what abstractions (if any) are valuable

@lidavidm
Copy link
Member Author

lidavidm commented Oct 9, 2025

In any case, what I'm trying to do is call methods from private_driver (and in the future, possibly patch/replace private_driver) so I expect the only thing you could do is make the fields public.

@mbrobbel
Copy link
Member

mbrobbel commented Oct 9, 2025

private_driver

Makes sense, this should be pub or accessible via a pub method.

@lidavidm lidavidm merged commit e03f1cc into apache:main Oct 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust/ffi: all fields should be public

2 participants