![]() |
#1 |
Pest
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
|
GoLang on Kindle
"Go is an open source programming language that makes it easy to build simple, reliable, and efficient software". It's a compiled programming language derived from "C" created at Google in 2007 by Robert Griesemer, Rob Pike (yes, that Rob Pike), and Ken Thompson (yes, that Ken Thompson). You can get it here for your platform.
It comes with a native cross compiler enabling the programmer to build binaries for the most common operative systems and architectures in a very easy way. You install it, you set the environment variable GOROOT to the Go install directory, GOPATH to your work directory, add $GOROOT/bin (or %GOROOT%/bin) to your PATH, and you're ready to go. Create a directory hello in your work directory, enter it, and create there the typical hello world demo source code: Code:
package main import "fmt" func main() { fmt.Println("Hello, world") } Switching from an OS to another or between hardware architectures is as easy as setting two environment variables and compile again your project. As far as I know PW3, for example, should be an ARM Cortex A8, implementing the ARMv7A specs. The variables to set are: Code:
GOOS=linux GOARCH=arm GOARM=7 At the moment I haven't got a Kindle to test Go generated binaries: my PW1 has been stolen and I'm waiting a PW3, hoping it's still jailbreakeable. Can anybody try it, please? Last edited by pirl8; 04-20-2017 at 06:07 PM. |
![]() |
![]() |
![]() |
#2 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
It would be nice if you referenced the existing thread on using the GO language.
It would save your readers from having to search for a thread that is several years old. |
![]() |
![]() |
Advert | |
|
![]() |
Tags |
cross-compile, golang |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Golang for arm and Pocketbook | transient | PocketBook Developer's Corner | 0 | 05-16-2015 01:22 PM |
$0.01 in Kindle Store: Interactive Sudoku for Kindle 2 and Kindle DX - Volume 1 | Xia | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 11-07-2009 10:06 AM |