finds.dev← search

// the find

mitchellh/zig-objc

★ 341 · Zig · MIT · updated Apr 2026

Objective-C runtime bindings for Zig (Zig calling ObjC).

Thin Zig bindings to the Objective-C runtime, letting you call ObjC APIs directly from Zig without writing any ObjC. Aimed at Zig developers building macOS/iOS tools who want to reach Cocoa without bridging through C. Mitchell Hashimoto uses it in his own daily-driver software, so it's battle-tested in at least one real codebase.

The msgSend API is idiomatic Zig — you pass the expected return type as a comptime parameter and get type-safe dispatch without macros or codegen. Block support is genuinely useful and non-trivial; passing Zig closures as ObjC blocks back into Cocoa APIs is the hard part of any ObjC bridge and this handles it. Source is small and well-commented enough that 'read the source' is a reasonable documentation strategy, not a cop-out. CI is wired up and the library only targets released Zig versions, which means it won't silently break on you between nightly builds.

Coverage is explicitly incomplete — protocols, dynamic class registration, and several runtime APIs are missing. The project owner has stated they only add what they personally need, so if you hit a gap, your only option is a PR. No ARC support; you manage memory manually through autorelease pools, which is fine if you know ObjC but a footgun for Zig developers who don't. iOS/tvOS are theoretically in scope (the README mentions them) but there's no evidence of CI or testing on those targets, so treat macOS as the only supported platform in practice.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →