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. MySql 日期函数

    在 MySql 中经常会用到日期,关于常用的日期函数,做了以下的总结: 1 . now() 作用; 获取当前的日期 除此之外,获取当前日期的函数还有: current_timestamp(); cur ...

  2. mysql中NULL和null的区别

    接触php的web开发一段时间了,在进行数据库操作的时候经常会遇到一个问题,使得同一字段在页面显示时有3种类型NULL,null以及数字,当时的解决办法是将这一字段定义为varchar类型,在插入数据 ...

  3. hive安装(一)

    1.解压 [root@cluster3 hadoop]# tar -zxvf apache-hive--bin.tar.gz 2.修改环境变量 export HIVE_HOME=/usr/local/ ...

  4. Java基础——多线程

    Java中多线程的应用是非常多的,我们在Java中又该如何去创建线程呢? http://www.jianshu.com/p/40d4c7aebd66 一.常用的有三种方法来创建多线程 新建一个类继承自 ...

  5. TCP/IP详解学习笔记(6)-- IP选路

    1.概述      路由算法是用于获取路由表中的路由项目.它是路由选择协议的核心. 2.路由算法的分类      从路由算法能否随网络的通信量或拓扑自适应的进行调整变化来分,可以分为两类. 静态路由选 ...

  6. hdu2444

    #include <stdio.h> #include <string.h> #define black 1 #define white -1 ]; ]; ][]; int n ...

  7. 极速地将git项目部署到SAE的svn服务器上

    本文最初发布于我的个人博客:http://jerryzou.com/posts/gitForSAE/ 我花了一些时间自己写了一个能够极速地将一个git项目部署到SAE的svn服务器上的脚本.代码不是复 ...

  8. Dynamic Web Project创建及版本修改的问题

    java项目中,若切换服务器,经常会涉及到动态web模块版本的问题.      比如:新建了web项目,开始使用tomcat服务器,但是后来使用jboss服务器,就会出现:Project facet ...

  9. VS2010 自动关闭的问题解决方法

    分为如下几个解决方法: 没有安装VS2010的SP1,安装后,问题解决了 自定义设置,出现了不正确的情况,执行 devenv.exe /resetsettings 可以排除故障 使用 devenv.e ...

  10. 新浪SAE URLRewrite(伪静态、重定向)详解

    SAE全称Sina App Engine,真是一个好东西,他有很多优秀的特性,简单来说SAE就是一个简单高效的分布式Web服务开发.运行平台.支持现在常用的 PHP+Mysql 环境,在开发中难免会碰 ...