Wednesday, May 7, 2014

How Bradfitz is running a Go binary on Android

My afternoon project was "porting" Camlistore's "camput" program so it could run on Android (as a child helper process under the Java/Dalvik process)
You can already cross-compile Go apps for different operating systems (I'm on an x86 Mac today) just by doing:
$ GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -o camput.armcamlistore.org/cmd/camput
But that's not enough, because Go's standard library assumes that a runtime.GOOS of "linux" means a lot of things, like:

continue readinghttps://plus.google.com/+BradFitzpatrick/posts/DWmyygSrvt7