Repository navigation
v0.8.0
ABIBridge v0.8.0
Breaking Changes
- Swift callable handles and hook continuations now use complete function signatures, such as
NativeSwiftFunction<(Int64) -> String>. Native errors and async isolation belong in the signature; separate throwing/async handle types andinheritsCallerIsolation:have been removed. - Replace
substituting:withgenericArguments:. Swift getters now take a zero-argument function type, such as(() -> String).self. NativeSwiftValuereplacesNativeSwiftOpaqueValue. UseNativeSwiftClosurewithNativeSwiftBorrowedValueinstead ofNativeSwiftBorrowingClosure, and ordinary member handles instead ofborrowedMethodandborrowedGetter.ABICopyObjCMethodnow takes consumed-parameter indexes and a count; passNULL, 0for ordinary borrowed parameters. Native hook callers must also initialize the new consumed-parameter fields inABIObjCHookOptions.
New Features
- Bind multiple generic parameters, constraints, and type packs across Swift functions, generic types, and members using existing native conformances.
- Pass runtime-only values through calls and callbacks with borrowing, consuming, and inout ownership. Support noncopyable payloads and process nonescapable results inside
unsafeInvoke(..., withResult:). - Compose tuples, runtime values, and nested or returned closures through the same calling APIs. Resolve generic opaque results, including results inside tuples, optionals, and returned closures.
- Extend existential values and callbacks to parameterized protocols and generic superclass compositions. See the supported shapes and compiler limitations.
- Hook generic and async Swift imports and virtual methods while preserving generic bindings, native errors, and the caller's task across suspension.
- Call C/C++ variadic functions and Objective-C variadic messages or captured implementations with concrete argument tails and C's default argument promotions.
- Declare consumed Objective-C arguments with
NativeMethodOptions.consumedArguments. UseUnmanaged<T>for pointer-based Core Foundation references with explicit ownership.
Improvements
- Reduce allocation and preparation overhead for repeated native calls and Swift callbacks.
- Reduce repeated work in Swift type/protocol lookup, missing-module searches, and sparse pointer scans.
Migration Notes
See the Swift API migration guide for before-and-after examples covering signatures, generic arguments, runtime values, callbacks, and scoped results.
Full Changelog: v0.7.0...v0.8.0