0.38.0
This release includes some very exciting new features, in particular our first multicore support! Initially available on the RP2040 microcontrollers, now TinyGo can use both cores at the same time for true concurrency in hardware. Another very powerful new capability added in this release is USB Mass Storage Device (MSD) support on the RP2040/RP2350, SAMD21, and SAMD51 series of processors. We have also added experimental Boehm garbage collector for WebAssembly to speed up your production code.
- general
go.*: upgradegolang.org/x/toolsto v0.30.0all: add support for LLVM 20
- build
- go back to using MinoruSekine/setup-scoop for Windows CI builds
flake.*: upgrade to nixpkgs 25.05, LLVM 20Makefile: only detect ccache command when neededMakefile: create random filename inside ruleMakefile: don't set GOROOTMakefile: call uname at most onceMakefile: only read NodeJS version when it is needed
- compiler
- add support for
GODEBUG=gotypesalias=1 interp: fixcopy()from/to external buffers- add
-nobounds(similar to-gcflags=-B) compileopts: add library version to cached library pathbuilder: build wasi-libc inside TinyGobuilder: simplify bdwgc libc dependencybuilder: don't use precompiled librariescompileopts: enable support forGOARCH=wasmintinygo test
- add support for
- fixes
rp2350: Fix DMA to SPI transmits on RP2350 (#4903)microbit v2: use OpenOCD flash method on microbit v2 when using Nordic Semi SoftDevicemain: display all of the current GC options for the-gcflag- Remove duplicated error handling
sync: fixTestMutexConcurrenttest- fix race condition in
testdata/goroutines.go - fix build warnings on Windows ARM
- machine
usb: add USB mass storage class support- implement usb receive message throttling
- declare usb endpoints per-platform
samd21: implement watchdogsamd51: write to flash memory in 512 byte long chunkssamd21: write to flash memory in 64 byte long chunks- don't inline RTT
WriteByteeverywhere rp2: unexport machine-specific errorsrp2: discount scheduling delays in I2C timeouts (#4876)- use pointer receiver in simulated PWM peripherals
- add simulated PWM/timer peripherals
rp2: expose usb endpoint stall handlingarm: clear pending interrupts before enabling themrp2: merge common usb code (#4856)
- main
- add "cores" and "threads" schedulers to help text
- add
StartPosandEndPosto-jsonbuild output - change
-jsonflag to match upstream Go
- runtime
- don't lock the print output inside interrupts
- don't try to interrupt other cores before they are started
- implement
NumCPUfor the multicore scheduler - add support for multicore scheduler
- refactor obtaining the system stack
interrupt: addCheckpointtype- add
exportedFuncPtr - avoid an allocation in
(*time.Timer).Reset - stub runtime signal functions for
os/signalon wasip1 - move
timeUnitto a single place - implement
NumCPUfor-scheduler=threads - move
mainExitedboolean internal/task: renametinygo_pausetotinygo_task_exit- map every goroutine to a new OS thread
- refactor
timerQueue - make conservative and precise GC MT-safe
internal/task: implement atomic primitives for preemptive scheduling- Use diskutil on macOS to extract volume name and path for FAT mounts #4928
- standard library
net: update submodule to latest commitsruntime/debug: add GC related stubsmetrics: flesh out some of the metric typesreflect: Chan related stubsos: handle relative and abs paths inExecutable()os: addos.Executable()for Darwinsync: implementRWMutexusing futexesreflect: AddSliceOf,ArrayOf,StructOf,MapOf,FuncOf
- targets
rp2040: add multicore supportriscv32: usegdbbinary as a fallback- add target for Microbit v2 with SoftDevice S140 support for both peripheral and central
windows: use MSVCRT.DLL instead of UCRT on i386windows: add windows/386 supportarm64: remove unnecessary.sectiondirectiveriscv-qemu: actually sleep intime.Sleep()riscv: define CSR constants and use them where possibledarwin: support Boehm GC (and use by default)windows: add support for the Boehm-Demers-Weiser GCwindows: fix wrong register for first parameter
- wasm
- add Boehm GC support
- refactor/modify stub signal handling
- don't block
//go:wasmexportbecause of running goroutines - use
int64instead offloat64for thetimeUnit
- boards
- Add board support for BigTreeTech SKR Pico (#4842)