tinygo 0.6.0

TinyGo is a compiler for the Go language, designed for use in areas such as microcontrollers, WASM, and the development of command-line utilities.

TinyGo utilizes tools and libraries written in the Go project while providing an alternative method for compiling programs based on the LLVM project.

Project Goals:

  1. Ensure minimal size of executable files.
  2. Support for the largest number of microcontrollers.
  3. Support for WebAssembly.
  4. Good support for CGo.
  5. Support for original Go code without changes.

Example of use for switching an LED on a microcontroller:

package main

import (
"machine"
"time"
)

func main() {
led := machine.LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
led.Low()
time.Sleep(time.Millisecond * 1000)

led.High()
time.Sleep(time.Millisecond * 1000)
}
}

Version 0.6.0 includes numerous changes, primarily related to improved support for CGo, js.FuncOF (Go 1.12+), as well as two new debugging boards: Adafruit Feather M0 and Adafruit Trinket M0.

The full changelog is available on project page on GitHub.

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster