Go support for Android

David Crawshaw

June 2014

Abstract

We propose to introduce Go support for the Android platform. The focus will be on supporting games written in Go. The APIs will be those defined in the Android NDK.

Background

Android is an operating system designed for running apps. An app relies on far more platform libraries and services than are provided by a traditional Unix operating system, which means a direct port of the Go runtime to Android without new APIs would not be particularly useful.

Providing a Go equivalent to the Android platform is intractable. The platform is written in Java and has a huge API surface. Any attempt to wrap these APIs in Go would give an undesirable result: manually built wrappers would lag in features, automatically generated wrappers would lead to ugly Go. And either way, it would be slow.

There is however, a subset of Android apps written against a much smaller C-based API surface provided in the Android NDK: Games. It is feasible to build Go support for Android providing the equivalent features found in the NDK.

Proposal

During the Go 1.4 cycle, GOOS=android will be introduced to the Go repository, along with cgo support on Android (contributed by Elias Naur). Dalvik-loadable .so files will be produced using the external linker provided in the Android NDK.

For the build dashboard, we will maintain a cross-compiling builder that runs the Go tool on a linux host and uses the adb tool to run test binaries on a stock Android device.

We will introduce a subrepository, go.mobile. It will house:

  • Bindings for OpenGL, OpenSL, and OpenMAX as exported through the Android NDK.

  • A Java -> Go language binding generator. Given a Go package, this will let Java code call it, so game menu UIs can be built in the standard SDK. (As Go defines the binding, it also makes it possible to use the same code to bind to languages like Objective C.)

  • Android Studio build system integration.

Binary releases will be provided after the project has stabilized.

Go support for Android的更多相关文章

  1. iMX6QD How to Add 24-bit LVDS Support in Android

    iMX6QD How to Add 24-bit LVDS Support in Android 版本 4 由 Ying Liu 于 2012-10-14 下午11:52创建,最后由 Jodi Pau ...

  2. [Android]官网《Testing Support Library》中文翻译

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5048524.html 翻译自 Android Develope ...

  3. Support Library官方教程(3)android studio中导入支援包

    Support Library Setup How you setup the Android Support Libraries in your development project depend ...

  4. Android注解支持(Support Annotations)

    注解支持(Support Annotations) Android support library从19.1版本开始引入了一个新的注解库,它包含很多有用的元注解,你能用它们修饰你的代码,帮助你发现bu ...

  5. Android Support WorkManager使用详解

    使用WorkManager调度任务 WorkManager是一个库, 用以将工作入队, 当该工作的约束条件得到满足之后, WorkManager保证它的执行. WorkManager允许观测工作的状态 ...

  6. Android注解支持(Support Annotations) (转)

    原文地址:http://www.flysnow.org/2015/08/13/android-tech-docs-support-annotations.html 注解支持(Support Annot ...

  7. Missing android.support.FILE_PROVIDER_PATHS meta-data 报错原因分析

    此类错误多半因为拼写错误导致.有StackOverflow上便有网友将"FILE_PROVIDER_PATHS"误写成"FILE_PROVIDE_PATHS"的 ...

  8. Android注解支持Support Annotations详解

    ###注解支持(Support Annotations)Android support library从19.1版本开始引入了一个新的注解库,它包含很多有用的元注解,你能用它们修饰你的代码,帮助你发现 ...

  9. Material Design with the Android Design Support Library

    Material Design with the Android Design Support Library 原文http://www.sitepoint.com/material-design-a ...

随机推荐

  1. JS实现联想输入(二)

    JS实现联想输入(一)是主要针对单列结构的JSON格式的数据的,如果想满足多列结构的JSON格式的数据,也是非常容易的,其解决方案有至少有三种选择: 1:在后台Action方法中将多列的值拼成单列结构 ...

  2. 在shell中通过fifo与服务器交互

    首先,需要说的是:1.在shell中,运行的每一个命令至少启动一个新进程,且:$$:获取当前shell的进程号(PID)$! :执行上一个指令的PID2.重定向与管道有点类似,例子:cmd1 < ...

  3. css定义表格样式

    table.gridtable { font-family: verdana,arial,sans-serif; font-size:11px; color:#333333; border-width ...

  4. 【WCF】Silverlight+wcf+自定义用户名密码验证

    本文摘自 http://www.cnblogs.com/virusswb/archive/2010/01/26/1656543.html 在昨天的博文Silverlight3+wcf+在不使用证书的情 ...

  5. OpenLDAP 安装及配置 笔记

    首先下载 OpenLdap(Ldap服务器) 和 LdapAdmin(客户端) 两个软件 OpenLDAPforWindows_2.4.39.part1.rar OpenLDAPforWindows_ ...

  6. iPhone 6 (iOS 9.2) extractiion failed by XRY

    My colleague extracted an iPhone 6 with XRY and it is iOS 9.2 . Unfortunately the Wizard crashed and ...

  7. Track files and folders manipulation in Windows

    The scenario is about Business Secret and our client do worry about data leakage. They want to know ...

  8. facelets标签

    facelets标签 <ui:component>标签用于JSF组件树中插入一个uicomponent实例,并作为它包含的的组件和内容片断的根节点,这视图中这个标签以外的的内容被编译器忽略 ...

  9. 使用eclipse与jLink V8调试exynos 4412 u-boot

    /** ****************************************************************************** * @author    Maox ...

  10. mvc路由设置参数配置类似于url重写

    1.新建的mvc项目中Global.asax 2.在另外一个控制器中的视图中 3. 4.