• Go support for Android


    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.

  • 相关阅读:
    tcp/ip协议
    soap协议
    JS引擎运行js过程
    clear:both可以清除浮动的原理(给子元素设置clear:both相当于给它自动设置了1个mrgin-top外边距从而可以撑开父盒子高度)
    BFC详解
    圣杯布局和双飞翼布局的作用和区别
    flex布局之space-evenly兼容性不好,巧用space-between实现space-evenly效果
    css巧用 transform的 rotate属性得到三角形箭头(取代iconfont的字体符号)
    li 鼠标悬停抖动问题
    小米官网首页商品列表鼠标悬停动画和阴影效果
  • 原文地址:https://www.cnblogs.com/zolo/p/5849138.html
Copyright © 2020-2023  润新知