README

Go support for Mobile devices

The Go mobile repository holds packages and build tools for using Go on mobile platforms.

Package documentation as a starting point:

Caution image

The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.

This is early work and installing the build system requires Go 1.5. Follow the instructions on golang.org/wiki/Mobile to install the gomobile command, build the basic and the bind example apps.

--

Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.

Expand ▾ Collapse ▴

Directories

Path Synopsis
app Package app lets you write portable all-Go apps for Android and iOS.
app/internal/apptest Package apptest provides utilities for testing an app.
app/internal/testapp Small test app used by app/app_test.go.
asset Package asset provides access to application-bundled assets.
bind Package bind implements a code generator for gobind.
bind/java Package java implements the Java language bindings.
bind/objc Package objc implements the Objective-C language bindings.
bind/seq Package seq implements the machine-dependent seq serialization format.
cmd/gobind Gobind generates language bindings that make it possible to call Go functions from Java and Objective-C. Typically gobind is not used directly.
cmd/gomobile Gomobile is a tool for building and running mobile apps written in Go.
event/key Package key defines an event for physical keyboard keys.
event/lifecycle Package lifecycle defines an event for an app's lifecycle.
event/mouse Package mouse defines an event for mouse input.
event/paint Package paint defines an event for the app being ready to paint.
event/size Package size defines an event for the dimensions, physical resolution and orientation of the app's window.
event/touch Package touch defines an event for touch input.
example/basic An app that draws a green triangle on a red background.
example/bind/hello Package hello is a trivial package for gomobile bind example.
example/flappy Flappy Gopher is a simple one-button game that uses the mobile framework and the experimental sprite engine.
example/network An app that paints green if golang.org is reachable when the app first starts, or red otherwise.
exp/app/debug Package debug provides GL-based debugging tools for apps.
exp/audio/al Package al provides OpenAL Soft bindings for Go.
exp/f32 Package f32 implements some linear algebra and GL helpers for float32s.
exp/font Package font provides platform independent access to system fonts.
exp/gl/glutil Package glutil implements OpenGL utility functions.
exp/sensor Package sensor provides sensor events from various movement sensors.
exp/sprite Package sprite provides a 2D scene graph for rendering and animation.
exp/sprite/clock Package clock provides a clock and time functions for a sprite engine.
exp/sprite/glsprite Package glsprite implements a sprite Engine using OpenGL ES 2.
exp/sprite/portable Package portable implements a sprite Engine using the image package.
geom Package geom defines a two-dimensional coordinate system.
gl Package gl implements Go bindings for OpenGL ES 2.0 and ES 3.0.
internal/binres Package binres implements encoding and decoding of android binary resources.
internal/importers The importers package uses go/ast to analyze Go packages or Go files and collect references to types whose package has a package prefix.
internal/importers/java The java package takes the result of an AST traversal by the importers package and queries the java command for the type information for the referenced Java classes and interfaces.
internal/importers/objc The objc package takes the result of an AST traversal by the importers package and uses the clang command to dump the type information for the referenced ObjC classes and protocols.
internal/mobileinit Package mobileinit contains common initialization logic for mobile platforms that is relevant to both all-Go apps and gobind-based apps.