Repository navigation
Releases: deploymenttheory/go-bindings-macosplatform
Release list
v0.20.1
v0.20.0
v0.19.0
0.19.0 (2026-08-11)
⚠ BREAKING CHANGES
All 15 Apple C libraries moved from CGo bridges to purego, so bindings/libraries/… now builds and runs under CGO_ENABLED=0. The generated API did not change — the public library surface is byte-identical to v0.18.1 — but three public runtime packages that existed only to serve the CGo path have been removed.
If you import only bindings/frameworks/… or bindings/libraries/…, the intended consumable API, nothing changes for you.
Removed: bindings/runtime/cgo
| v0.18.1 | v0.19.0 |
|---|---|
cgo.RunOnMainThread(fn) |
mainthread.Do(fn) — opinionated/tools/grandcentraldispatch/mainthread |
cgo.PumpMainRunLoop(secs) |
mainthread.PumpMainRunLoop(secs) — same package |
cgo.Object |
objptr.Object — bindings/runtime/objptr |
cgo.Retain / cgo.Release |
purego.Retain / purego.Release — bindings/runtime/purego |
cgo.NSStringToGoString / cgo.GoStringToNSString |
purego.GoString / purego.NSString |
cgo.NSErrorToError |
purego.NSErrorToError (returns a structured *objcerrors.ObjCError) |
cgo.ClassNameOf |
rt.ClassNameOf — bindings/runtime/rt |
Prefer mainthread.Do over purego.Main when porting RunOnMainThread: purego.Main falls back to running the closure inline on the current thread when dispatch fails to load, which RunOnMainThread never did.
These have no direct replacement, because they served the CGo calling convention rather than the ObjC runtime: Track, KeepAlive, AllocObject, FreePtr, WrapObject, WrapTyped, RaiseIfException, ExceptionInfoFromPtr, ExceptionReason, SetDeallocListener, InstallCrashHandlers, SetAssociatedObject / GetAssociatedObject / RemoveAssociatedObjects, DispatchAsyncMain. There is no bridge to catch an NSException across, no malloc'd struct return to free, and no finalizer needed to release a +1 bridge return. Code that held objects directly now manages their lifetime with purego.Retain / purego.Release.
Removed: bindings/runtime/blocks, bindings/runtime/callbacks
The CGo block and method-callback trampoline registries. No replacement needed — purego block adapters call objc.NewBlock directly, so nothing imports them.
Added: bindings/runtime/objptr
A dependency-free interface{ Ptr() unsafe.Pointer }, split out of the old cgo package. Generated library protocol interfaces embed it, so a CGO_ENABLED=0 consumer cannot pull a runtime back in through a protocol file.
Features
- codegen: migrate AppleArchive to purego — all 15 C libraries now pure Go (#116) (a32f335)
- codegen: migrate bsm, libproc, machhost to the purego backend (struct-by-value tier) (#111) (ac743ec)
- codegen: migrate dispatch to purego (manual body for header-inline symbols) (#114) (f0602dd)
- codegen: migrate oslog to purego (#115) (66410d5)
- codegen: migrate xpc to purego (pure-Go Object seam + local-enum preference) (#113) (24d136d)
- codegen: purego backend as body-swap in the CGo pipeline; migrate 7 libraries with live CGO_ENABLED=0 suite (#110) (2f062eb)
- codegen: purego backend for C libraries; migrate machtime (Phase 0 pilot) (#108) (4e1d223)
- codegen: purego block-parameter support; migrate endpointsecurity (#112) (794ef23)
v0.18.1
v0.18.0
0.18.0 (2026-07-24)
Features
- idiomatic: CFTypeRef polymorphism + mutable->immutable handle widening (#98) (a44eafa)
- idiomatic: surface CF/opaque handles as distinct named types, not obj.Object (7e6fd7c)
- idiomatic: surface dispatch/xpc handle params as concrete library types (#91) (17a8326)
- idiomatic: thread in/out counts, typed block params, pointer returns (#88) (3c6138c)
- idiomatic: type fixed-size array struct fields & struct-pointer params (#92) (e56e3f3)
- idiomatic: type pointer-to-struct returns; capture referenced C structs (#90) (3045aed)
- idiomatic: width-correct struct int fields; cross-check clang layouts (#93) (9379aad)
- idiomatic: unions fnptrs (#99) (c4d649c)