Go support for Android

时间:2022-08-22 18:38:41

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 报错原因分析

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

  8. Android注解支持Support Annotations详解

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

  9. Android Weekly Notes Issue #235

    Android Weekly Issue #235 December 11th, 2016 Android Weekly Issue #235 本期内容包括: 开发一个自定义View并发布为开源库的完 ...

随机推荐

  1. MVC跨项目路由

    我们在实际应用开发中,经常遇到多人共同开发维护同一个项目情况,所以不免会出现其中一个人代码出现bug质量问题导致整个项目就原地“爆炸”的惨状.在之前公司经常遇到某个人忘记更新(我就做个此事[&quot ...

  2. SVG颜色、渐变和填充

    颜色 RGB和HSL都是CSS3支持的颜色表示方法,一般普遍使用是RGB.PS:HSL浏览器兼容. RGB RGB即是代表红.绿.蓝三个通道的颜色,通过对红(R).绿(G).蓝(B)三个颜色通道的变化 ...

  3. SecureCRT使用Vim出现中文乱码问题的解决

    1. 首先保证securecrt本身显示中文是ok的.如果不是,就先解决这一个问题. 2. vi ~/.vimrc 添加set encoding=utf-8 fileencodings=ucs-bom ...

  4. Blend4开发:会飞的小鸟

    1,绘图,动画制作: 2,运行截图: 源码:http://files.cnblogs.com/yuanli/Animals.zip 动画效果参见源码.

  5. 从客户端中检测到有潜在危险的 Request.Form或Requst.String的值。

    在ASP中客户端请求服务时会出现"从客户端中检测到有潜在危险的 Request.Form或Requst.QueryString的值.",原因是在web.config配置文件中存在这 ...

  6. 设计模式系列19:策略模式(Stragety Pattern)

    定义 定义一系列算法,将它们一个个封装起来,并且使它们可以互相替换,该模式使得算法可独立于使用它的客户而变化.    --<设计模式>GoF UML类图 使用场景 一个系统有许多类,而区分 ...

  7. 解决Linux启动redis时出现提示权限不够问题

    如果权限不够请使用一条命令 chmod 777  操作 参考:https://blog.csdn.net/zczzsq/article/details/8162339

  8. oracle 优化or 更换in、exists、union all几个字眼

    oracle 优化or 更换in.exists.union几个字眼.测试没有问题! 根据实际情况选择相应的语句是.假设指数,or全表扫描,in 和not in 应慎用.否则会导致全表扫描.  sele ...

  9. jQuery实现两个DropDownList联动&lpar;MVC&rpar;

    近段时间原本是学习MVC的,谁知道把jQuery也学上了.而且觉得对jQuery更感兴趣,比如今早上有写了一个练习<jQuery实现DropDownList(MVC)>http://www ...

  10. linux系统编程:用truncate调整文件大小

    truncate的使用非常简单: int truncate(const char *path, off_t length); 参数1:文件名 参数2:  文件需要被调整的大小 length 大于 文件 ...