draft: testing transition from abi_stable to stabby#21025
Draft
timsaucer wants to merge 1 commit intoapache:mainfrom
Draft
draft: testing transition from abi_stable to stabby#21025timsaucer wants to merge 1 commit intoapache:mainfrom
timsaucer wants to merge 1 commit intoapache:mainfrom
Conversation
Replace `abi_stable` and `async-ffi` dependencies with `stabby` for ABI-stable FFI types, and custom `#[repr(C)]` replacements for async primitives and Option/Result wrappers. Key changes: - Replace `RVec`/`RString`/`RStr`/`RSlice` with stabby equivalents - Replace `RHashMap<K,V>` with `stabby::alloc::vec::Vec<(K,V)>` - Add `ffi_option.rs` with `FfiOption<T>`/`FfiResult<T,E>` (#[repr(C,u8)] enums that work without IStable bounds on T) - Add `ffi_future.rs` replacing async-ffi with custom FfiFuture/FfiPoll/ FfiContext types - Simple enums use `#[stabby::stabby]` + `#[repr(u8)]` for compile-time ABI verification - Replace RootModule/export_root_module with #[no_mangle] + libloading - Update FFI examples to match new patterns - All 98 tests pass (81 unit + 17 integration) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
@coderfender if you want it, this is a purely LLM generated PR that I had Claude Opus write last night. I did test it against datafusion-python. If this is helpful, please let me know. Otherwise I can delete this branch if you want to take a different approach. There is a massive caveat here: I have NOT reviewed this code. I just wanted to give you a jumping off point. |
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.
Which issue does this PR close?
generational-arenafrom project #20863Rationale for this change
abi_stableappears unmaintained and has some stale dependencies that are marked as vulnerabilities.What changes are included in this PR?
The following is a LLM generated changelog:
Replace
abi_stableandasync-ffidependencies withstabbyfor ABI-stable FFI types, and custom#[repr(C)]replacements for async primitives and Option/Result wrappers.Key changes:
RVec/RString/RStr/RSlicewith stabby equivalentsRHashMap<K,V>withstabby::alloc::vec::Vec<(K,V)>ffi_option.rswithFfiOption<T>/FfiResult<T,E>(#[repr(C,u8)] enums that work without IStable bounds on T)ffi_future.rsreplacing async-ffi with custom FfiFuture/FfiPoll/ FfiContext types#[stabby::stabby]+#[repr(u8)]for compile-time ABI verificationAre these changes tested?
Tested against datafusion-python and existing unit tests.
Are there any user-facing changes?
This is an breaking API change in the FFI crate. Users should not need to migrate their code, but it does impact the ABI. Major versions are not currently guaranteed to be compatible until #17374 resolves.