0.26.0
This is another TinyGo release with many small changes, including over 110 commits.
This release introduces two possible breaking changes:
-
The
machinepackage has had some changes in the public API, to remove some unintentionally exported constants. It is likely that very little real-world code is affected by this change. -
WebAssembly files could previously import functions by leaving a Go function unimplemented, like so:
func add(a, b int) int
This worked by accident. With this release, this is no longer possible. Instead, functions will need to be imported explicitly to avoid a compiler error:
//export add func add(a, b int) int
(The
//exportmay be confusing, we intend to add a less-confusing//go:wasm-importdirective in the future).
Here is a detailed changelog for this release:
- general
- remove support for LLVM 13
- remove calls to deprecated ioutil package
- move from
os.IsFootoerrors.Is(err, ErrFoo) - fix for builds using an Android host
- make interp timeout configurable from command line
- ignore ports with VID/PID if there is no candidates
- drop support for Go 1.16 and Go 1.17
- update serial package to v1.3.5 for latest bugfixes
- remove GOARM from
tinygo info - add flag for setting the goroutine stack size
- add serial port monitoring functionality
- compiler
cgo: implement support for static functionscgo: fix panic when FuncType.Results is nilcompiler: add aliases foredwards25519/field.feMulandfield.feSquarecompiler: fix incorrect DWARF type in some generic parameterscompiler: use LLVM math builtins everywherecompiler: replace some math operation bodies with LLVM intrinsicscompiler: replace math aliases with intrinsicscompiler: fixunsafe.Sizeoffor chan and map valuescompileopts: use tags parser from buildutilcompileopts: use backticks for regexp to avoid extra escapescompileopts: fail fast on duplicate values in target field slicescompileopts: fix windows/arm target triplecompileopts: improve error handling when loading target/*.jsoncompileopts: add support for stlink-dap programmercompileopts: do not complain about-no-debugon MacOSgoenv: supportGOOS=androidinterp: fix reading from external globalloader: fix link error forcrypto/internal/boring/sig.StandardCrypto
- standard library
- rename assembly files to .S extension
machine: add PWM peripheral comments to pinsmachine: improve UARTParity slightlymachine: do not export DFU_MAGIC_* constants on nrf52840machine: renamePinInputPullUp/PinInputPullDownmachine: addKHz,MHz,GHzconstants, deprecateTWI_FREQ_*constantsmachine: remove level triggered pin interruptsmachine: do not exposeRESET_MAGIC_VALUEmachine: useNoPinconstant where appropriate (instead of0for example)net: sync net.go with Go 1.18 stdlibos: addSyscallError.Timeoutos: addErrProcessDoneerrorreflect: implementCanInterfaceand fix stringIndexruntime: makeMemStatsavailable to leaking collectorruntime: addMemStats.TotalAllocruntime: addMemStats.MallocsandFreesruntime: add support fortime.NewTimerandtime.NewTickerruntime: implementresetTimerruntime: ensure some headroom for the GC to runruntime: make gc and scheduler asserts settable with build tagsruntime/pprof: addWriteHeapProfileruntime/pprof:runtime/trace: stub some additional functionssync: implementMap.LoadAndDeletesyscall: group WASI consts by purposesyscall: add WASI{D,R}SYNC,NONBLOCKFD flagssyscall: add ENOTCONN on darwintesting: add support for -benchmem
- targets
- remove USB vid/pid pair of bootloader
esp32c3: remove unusedUARTStopBitsconstantsnrf: implementGetRNGfunctionnrf:rp2040: addmachine.ReadTemperaturenrf52: cleanup s140v6 and s140v7 uf2 targetsrp2040: implement semi-random RNG based on ROSC based on pico-sdkwasm: add summary of wasm examples and fix callback bugwasm: do not allow undefined symbols (--allow-undefined)wasm: make sure buffers returned bymallocare kept untilfreeis calledwindows: save and restore xmm registers when switching goroutines
- boards
- add Pimoroni's Tufty2040
- add XIAO ESP32C3
- add Adafruit QT2040
- add Adafruit QT Py RP2040
esp32c3-12f:matrixportal-m4:p1am-100: remove duplicate build tagshifive1-qemu: remove this emulated boardwioterminal: add UART3 for RTL8720DNxiao-ble: fix usbpid