4 ms·
anyone care to explain the technical how-to that made this possible.
by suyash 11y ago
anyone care to explain the technical how-to that made this possible.
- kejaed 11y agoCould be related to this https://news.ycombinator.com/item?id=9815464 https://news.ycombinator.com/item?id=9815464
- crawshaw 11y agoThe gomobile tool is part of the broader project, but that particular CL is about `gomobile build`, a sub-command designed to build all-Go apps. From inside Go, we have only built out access to portable APIs like OpenGL. This app uses a different mode of the same tool, `gomobile bind`. This lets you use a Go package from inside an Android app, or from ObjC in an iOS app. It is related but parallel work.
- fleitz 11y agoI can estimate it as follows. Cocoa/UIKit works in ObjC. ObjC is a super set of C that translates the objc parts to calls to objc_msgsend. Go supports ARM/OSX. Go makes it pretty easy to call into C Therefore it should be pretty easy to port to iOS, all you need to do is to write a bit of go to interface with objc_msgsend.
- crawshaw 11y agoThis work is the extension of the Go on mobile experiment for Android, which was originally proposed here: http://golang.org/s/go14android http://golang.org/s/go14android. Over the past several months, several open source contributors (most notably minux) and I have been working on darwin/arm and darwin/arm64 support for Go 1.5. We can build binaries, and we can build Go packages as C archives that can be compiled into an ObjC program. At the same time Hana has been extending gobind (http://golang.org/s/gobind http://golang.org/s/gobind) with ObjC support, and came up with the idea of turning Rob's Ivy into an app. Hana built the Android app, I did the iOS app. This is a few hundred lines of ObjC/UIKit for the UI, calling into a Go function: func Exec(line string) (string, error) With the bulk of the app being the actual Ivy implementation in Go. It will be open source when I find the hours in the next week.
- fit2rule 11y agoJust wanted to thank you and acknowledge your work - Go on iOS represents a significant opportunity. Thanks!