This release adds a few pretty major features to TinyGo: the embed
package, recover()
(for most non-wasm architectures), and generics. It also adds initial (incomplete) support for Go 1.19, which is still in beta. Apart from that, we have the usual assortment of new features and bug fixes and we add the Badger 2040 board.
One possible breaking change is that we will now use a few newer WebAssembly features. If this is a problem, let us know and we can add a new target without these newer features. We use them because it lowers the binary size of the .wasm
files.
Here is the complete changelog:
- command line
- remove support for go 1.15
- remove support for LLVM 11 and LLVM 12
- add initial Go 1.19 beta support
test
: fix package/... syntax
- compiler
- add support for the embed package
builder
: improve error message for "command not found"builder
: add support for ThinLTO on MacOS and Windowsbuilder
: free LLVM objects after use, to reduce memory leakingbuilder
: improve-no-debug
error messagescgo
: be more strict: CGo now requires every Go file to import the headers it needscompiler
: alignof(func) is 1 pointer, not 2compiler
: add support for type parameters (aka generics)compiler
: implementrecover()
built-in functioncompiler
: support atomic, volatile, and LLVM memcpy-like functions in defercompiler
: drop support for macos syscalls via inline assemblyinterp
: do not try to interpret past task.Pause()interp
: fix some buggy localValue handlinginterp
: do not unroll loopstransform
: fix MakeGCStackSlots that caused a possible GC bug on WebAssembly
- standard library
os
: enable os.Stdin for baremetal targetreflect
: addValue.UnsafePointer
methodruntime
: scan GC globals conservatively on Windows, MacOS, Linux and Nintendo Switchruntime
: add per-map hash seedsruntime
: handle nil map write panicsruntime
: add stronger hash functionssyscall
: implementGetpagesize
- targets
atmega2560
: support UART1-3 + example for uartavr
: use compiler-rt for improved float64 supportavr
: simplify timer-based timeavr
: fix race condition in stack writedarwin
: add support forGOARCH=arm64
(aka Apple Silicon)darwin
: support-size=short
and-size=full
flagrp2040
: replace sleep 'busy loop' with timer alarmrp2040
: align api forPortMaskSet
,PortMaskClear
rp2040
: fix GPIO interruptssamd21
,samd51
,nrf52840
: add support for USBHID (keyboard / mouse)wasm
: update wasi-libc versionwasm
: use newer WebAssembly features
- boards
- add Badger 2040
matrixportal-m4
: attach USB DP to the correct pinteensy40
: add I2C supportwioterminal
: fix I2C definition