Skip to content

docs: document datafusion-ffi version compatibility - #27929

Open
alamb wants to merge 7 commits into
apache:mainfrom
alamb:alamb/ffi-compat-docs
Open

alamb wants to merge 7 commits into
apache:mainfrom
alamb:alamb/ffi-compat-docs

Conversation

@alamb

@alamb alamb commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The datafusion-ffi README currently says the crate defines interfaces "that will remain stable across different versions of DataFusion" which is not correct.

The FFI_* structs are #[repr(C)] structs of function pointers, and their layout changes whenever a callback is added or its signature changes.

As I noted in https://github.com/apache/datafusion/pull/27644/changes#r4761375019, the ABI compatibility is designed for libraries built against the same DataFusion version, not different ones, and this applies to FFI in general rather than to any one PR.

The only place the real rule is written down today is the rustdoc on datafusion_ffi::version(), which says the major version identifies compatibility.

The FFI does change between releases

Documenting the rule once means each such PR does not need to re-explain it in the upgrade guide.

What changes are included in this PR?

  1. Add a "Version Compatibility" section to datafusion/ffi/README.md

What is the testing strategy for this PR?

Documentation only, no tests.

Are there any user-facing changes?

Documentation only. No behavior or API changes.

alamb and others added 5 commits December 1, 2026 16:42
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@alamb
alamb marked this pull request as ready for review December 1, 2026 21:55
@alamb

alamb commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor Author

@timsaucer if you have time to review this PR for accuracy I would be most appreciative. I think it reflects reality

Comment thread datafusion/ffi/README.md

## Version Compatibility

The interfaces in this crate are **not** stable across major versions of

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am pretty sure this is correct and the actual usecase of this crate. Please correct me if I am wrong

@github-actions github-actions Bot added ffi Changes to the ffi crate and removed documentation Improvements or additions to documentation labels Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ffi Changes to the ffi crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant