You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MacDriver is a toolkit for working with Apple/Mac APIs and frameworks. It currently has 3 major components:
12
+
MacDriver is a toolkit for working with Apple/Mac APIs and frameworks in Go. It currently has 3 major "layers":
13
13
14
-
## Bindings for libobjc
14
+
## Bindings for Objective-C
15
15
The `objc` package wraps the [Objective-C runtime](https://developer.apple.com/documentation/objectivec/objective-c_runtime?language=objc) to dynamically interact with Objective-C objects and classes:
Lastly, a common use case for this toolkit is not building full native apps, but integrating Go applications
75
-
with various Mac systems, like windows, native menus, status icons (systray), etc.
74
+
Lastly, a common case for this toolkit is not just building full native apps, but integrating Go applications
75
+
with Mac systems, like windows, native menus, status icons (systray), etc.
76
76
One-off libraries for some of these exist, but besides often limiting what you can do,
77
77
they're also just not composable. They all want to own the main thread!
78
78
79
79
For this and other reasons, we often run the above kind of code in a separate process altogether from our
80
80
Go application. This might seem like a step backwards, but it is safer and more robust in a way.
81
81
82
82
The `bridge` package takes advantage of this situation to create a higher-level abstraction more aligned with a potential
83
-
cross-platform toolkit where you can declaratively describe and modify structs that can be copied to the bridge process and applied to the Objective-C
83
+
cross-platform toolkit. You can declaratively describe and modify structs that can be copied to the bridge process and applied to the Objective-C
84
84
objects in a manner similar to configuration management:
85
85
86
86
```go
@@ -89,7 +89,7 @@ package main
89
89
import (
90
90
"os"
91
91
92
-
"github.com/progrium/macdriver/pkg/bridge"
92
+
"github.com/progrium/macdriver/bridge"
93
93
)
94
94
95
95
funcmain() {
@@ -138,8 +138,7 @@ as needed until we have enough coverage/confidence to know how we'd generate wra
138
138
139
139
## Thanks
140
140
141
-
The original `objc` and `variadic` packages were written by Mikkel Krautz. The `variadic` package is a little magic to make everything possible since
142
-
libobjc relies heavily on variadic function calls, which aren't possible out of the box in Cgo.
141
+
The original `objc` and `variadic` packages were written by [Mikkel Krautz](https://github.com/mkrautz). The `variadic` package is some assembly magic to make everything possible since libobjc relies heavily on variadic function calls, which aren't possible out of the box in Cgo.
0 commit comments