Skip to content

v0.6.0

Choose a tag to compare

@lynnswap lynnswap released this 01 Oct 13:01
2cc3d53

ABIBridge v0.6.0

Reuse methods discovered on existing objects across compatible receivers, with prepared handles that are independent of their original receiver bindings.

Breaking Changes

  • Swift C++ object lookup now returns NativeBoundCXXMethod. Update explicit bound-type annotations from NativeCXXMethod; that name now describes a prepared implementation called with unsafeInvoke(on:...).
  • Replace ABIObjCMethodReceiver(binding) with (__bridge id)ABIObjCMethodReceiverAddress(binding). Keep the binding alive while using the borrowed receiver address.
  • Captured methods from NativeVTable(readingFrom:...) no longer retain the source receiver through table storage. Supply retainingCode: when generated code needs an independent lifetime owner.

New Features

  • Extract prepared methods through .method from Swift synchronous and async, Objective-C message, and C++ bound handles. Invoke them on another compatible receiver or retain a new binding without repeating discovery or call preparation.
  • Copy a receiver-independent C++ entry point with bound_method::method().
  • Reuse captured Objective-C++ implementations through objc_implementation<Signature> and bound.implementation(), with explicit-receiver unsafe_invoke and optional bind. The C interface adds ABIObjCImplementation ownership, compatibility checks, and binding operations.

Extracted handles retain their implementation images independently of the original binding. Swift, C++, and Objective-C++ captures preserve the selected implementation; ordinary Objective-C messages use current dispatch.

Bug Fixes

  • Wait for initializing images to become acquirable before imported-hook installation, avoiding permanent imageUnavailable outcomes that left future images unhooked.
  • Fix loaded-only image lookup through suffix symlink aliases such as Library.dylib.alias, which could report imageUnavailable after initialization completed. Initializing images remain unavailable, and loaded-only lookup does not request loading or initialization.

Documentation

  • Add method extraction and rebinding guides covering receiver and code ownership, captured dispatch, and API migration.

Full Changelog: v0.5.1...v0.6.0