Native Apple framework bindings for Go, enabling macOS application development without Objective-C or XCode.
DarwinKit is a Go library that provides bindings for Apple's native frameworks, enabling developers to build macOS applications using Go instead of Objective-C or Swift. It bridges Go with Apple's ecosystem, allowing the creation of native GUI applications, utilities, and tools by leveraging macOS-specific APIs like AppKit, Foundation, and WebKit. The project solves the problem of accessing Apple's native APIs from Go, eliminating the need for Objective-C or XCode project files for simple programs.
Go developers who want to build native macOS applications, utilities, or tools without switching to Objective-C or Swift, particularly those interested in creating lightweight GUI apps or system utilities. It also targets developers familiar with Apple's frameworks who prefer Go's simplicity for prototyping or building smaller-scale macOS software.
Developers choose DarwinKit because it provides direct, idiomatic Go bindings to Apple's frameworks, generated automatically from framework headers, covering thousands of classes and methods. Its unique selling point is enabling native macOS development in Go with minimal friction, leveraging Go's toolchain while integrating hybrid memory management that combines Go's garbage collection with Objective-C's reference counting.
Native Mac APIs for Go. Previously known as MacDriver
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides direct bindings to Apple frameworks like AppKit and Foundation via the Objective-C runtime, allowing full utilization of macOS-specific features without switching languages.
Enables writing macOS applications entirely in Go, eliminating the need for Objective-C or XCode project files, as demonstrated in the simple main.go example with standard Go toolchain.
Generates Go bindings from Apple's framework headers, covering thousands of classes and methods, ensuring up-to-date API coverage and reducing manual boilerplate.
Includes high-quality example utilities like ScanDrop and MenuSpacer, available to sponsors, which serve as templates for building real-world tools and prototypes.
Combines Go's garbage collection with Objective-C's reference counting, requiring manual memory management and increasing the risk of leaks or crashes, as detailed in the memory management documentation.
Framework exceptions cause segfaults with both Objective-C and Go stacktraces, making debugging a challenging hybrid process, a caveat explicitly admitted in the README.
Primarily supports macOS; while theoretical, support for iOS, tvOS, or watchOS is not practical or recommended for production, limiting cross-platform Apple development.
Requires XCode installation for framework headers, adding an extra setup step and tying the toolchain to Apple's development environment, which may not be feasible in all setups.