Releases: tinygo-org/tinygo
0.41.1
This point release has a few very important fixes for you all that could not wait.
0.41.0
This release is the most feature packed yet with over 150 commits to our main repo alone. We added Go 1.26 support to keep you up to date with the latest work from the mothership. We also have many improvements to our developer tooling and compatibility. And some big additions when it comes to hardware support, with ESP32 wireless, and the new Arduino UNO Q board too.
- general
- go.mod, compiler: bump minimum Go version to 1.23
- builder: support Go 1.26 now
- feat: add inheritable-only field to filter processor-level targets (#5270)
- feature: add esp32flash flash method for esp32s3/esp32c3/esp32/esp8266
- flashing: introduce flash method 'esp32jtag' for esp32c3/esp32s3 targets
- fashing: add "adb" flash method using Android Debug Bridge
- main: auto-use best available flashing options on esp32
- espflasher: update to espflasher 0.6.0
- compiler
- implement method-set based
AssignableToandImplements(#5304) - simplify
createObjectLayout - implement copy directly
- fix min/max on floats by using intrinsics
- add element layout to
sliceAppend - add intrinsic for
crypto/internal/constanttime.boolToUint8 - fix
SyscallNhandling for Windows on Go 1.26+
- implement method-set based
- core
- reflect: add
TypeAssert - reflect: fix
TypeAssertfor structs - sync: add
WaitGroup.Go - os: add
UserCacheDirandUserConfigDir - os: implement
Lchownfunction for changing file ownership (#5161) - testing: add
b.ReportMetric() - errors: add errors package to passing list
- internal/gclayout: use correct lengths
- internal/abi: add
EscapeNonString,EscapeToResultNonString - internal, runtime: add internal fips bool
- internal/itoa: resurrect from Go stdlib
- internal/syscall/unix: implement
GetRandomfor WASI targets - interp: make
ptrtointsize mismatch a recoverable error - loader: support "all:" prefix in
//go:embedpatterns - loader, crypto/internal/entropy: fix 32 MiB RAM overflow on microcontrollers
- loader, unicode/utf8: fix
hiBitsoverflow on 16-bit AVR targets - builder: order embedded files deterministically
- builder: fix panic in
findPackagePathwhen using -size short - builder: fix
SIGSEGVwhen stripping duplicate function definitions - builder, runtime: fix duplicate symbol error with Go 1.26+ on Windows
- builder: use target-specific -march for RISC-V library compilation
- transform: modify output format from the
-print-allocsflag to match the go coverage tool format - cgo: allow for changes to
short-enumsflag - wasm: add more stubbed file operations
- reflect: add
- machine
- esp32c3: implement
BlockDevicefor esp32c3 flash - esp32c3: clear
GPIO STATUSbefore dispatching pin callbacks - esp32c3: implement
USBDeviceusing interrupts - esp32c3: add
Enablestub for QEMU test target - esp32c3: fix interrupt disable handling
- esp32c3: clear
MCAUSEafter handling interrupt - esp32c3: map missing
IRAMsections in linker script - esp32c3: fix to use
PROVIDE()for WiFi/BLE ROM function addresses to allow blob overrides - esp32c3: add WiFi/BLE ROM linker support
- esp32c3: use
TIMG0alarm interrupt forsleepTicksinstead of busy-waiting - esp32s3: implement
Pin.SetInterruptfor GPIO pin change interrupts - esp32s3: use edge-triggered CPU interrupt for GPIO pin interrupts
- esp32s3: add interrupt support (#5244)
- esp32s3: switch USB implementation to use interrupts instead of polling
- esp32s3: replace inline ISR with full interrupt vector handler
- esp32s3: use
TIMG0alarm interrupt forsleepTicks - esp32s3: improve exception handlers, add
procPin/procUnpin, and linker wrap flags - esp32s3: fix Xtensa register window spill using recursive
call4in task switching - esp32s3: update linker script and boot assembly for multi-page flash XIP mapping
- esp32s3: add flash XIP boot assembly with cache/MMU init
- esp32s3: implement SPI (#5169)
- esp32s3: implement I2C interface (#5210)
- esp32s3: implement RNG based on onboard hardware random number generator
- esp32s3,esp32c3: add USB serial support
- esp32s3,esp32c3: add
txStalledflag to skip USB serial spin when no host - esp32s3,esp32c3: make USB Serial/JTAG writes non-blocking when FIFO is full
- esp32c3/esp32s3: refactor ADC implementation to reduce code duplication
- esp32s3,esp32c3: add ADC support (#5231)
- esp32s3,esp32c3: add PWM support (#5215)
- esp32c3/esp32s3: refactoring and corrections for SPI implementation
- esp32xx: add WASM simulator support for ESP32-C3/ESP32-S3 targets
- esp32: default SPI CS pin to
NoPinwhen unset - esp: fix
tinygo_scanCurrentStackto spill register windows - stm32: fix UART interrupt storm caused by uncleared overrun error
- stm32: fix PWM problem due to register shifting
- stm32: add STM32U585 target definition and runtime
- stm32: add STM32U5 GPIO, pin interrupts, and UART support
- stm32: add STM32U5 I2C support
- stm32: add STM32U5 SPI support
- stm32u585: implement ADC
- stm32g0b1: add support (#5150)
- stm32g0b1: add Watchdog + ADC support (#5158)
- stm32l0: add flash support
- stm32l0x1,l0x2: TIM: adapt to 32-bit register access
- stm32g0: sync with updated stm32 device files
- attiny85: add USI-based SPI support (#5181)
- attiny85: add PWM support (#5171)
- rp: add
Closefunction to UART to allow for removing all system resources/power usage - rp: use
blockReset()andunresetBlockWait()helper functions for peripheral reset/unreset - rp2: prevent PWM Period method overflow
- rp2: add per-byte timeout budget for I2C (#5189)
- feather-m0: export UART0 and pins
- usb/cdc: better ring buffer implementation (#5209)
- fix: replace ! with ~ for register mask
- atmega328p_simulator: add correct build tag for arduino_uno after renaming
- esp32c3: implement
- net
- update to Go 1.26.2 net package with UDP and JS improvements
- runtime
- implement
fminimum/fmaximum - make
timeoffsetatomic - add
MemStats.HeapObjects - handle
GODEBUGonwasip2(#5312) - fix Darwin
syscallreturn value truncation and lost arguments - add
syscall.runtimeClearenvfor Go 1.26 - split
syscallfunctions for darwin changes for 1.26 - fix: init heap before random number seed on wasm platforms
- implement
- targets
- add esp32s3-supermini board target
- add support for Seeedstudio Xiao-RP2350 board
- add Shrike Lite board (#5170)
- rename arduino target to arduino-uno
- add pins/setup for Arduino UNO Q board QWIIC connector
- correct pin mapping for Arduino UNO Q STM32 MCU
- add stm32u585 openocd commands for flashing on Arduino UNO Q
- correct name/tag use for esp32s3-wroom1 board
- modify esp32, esp32s3, esp32c3, & esp8266 targets to use built-in esp32flash
- switch rp2040/rp2350 to default to tasks scheduler
- change default stack size for esp32c3 and esp32s3 to 8196
- swan: rename group build tag stm32l4x5 => stm32l4y5 to avoid clash with stm32 device name
- nucleo-f722ze: add build-tag stm32f722
- fix: set stm32u5x clock rate to default
- create generic targets for esp32 boards
- libs
- stm32-svd: update submodule
- update tools/gen-device-svd for recent changes to stm32-svd file structure (#5212)
- build/test
- build: use Golang 1.26 for all builds
- build: actually use the version of llvm we are supposed to be testing by using brew link command
- build: let scoop run updates to resolve binaryen install failures on Windows
- ci: don't double zip release artifacts
- test: increase default timeout from 1 to 2 minutes to prevent spurious CI fails
- testdata: fix flaky timers test by draining ticker channel after Stop
- testdata: more corpus entries (#5182)
- add soypat/lneto to corpus
- GNUmakefile: add
contextandexpvarto stdlib tests - GNUmakefile: add
encoding/xmlto stdlib tests on Linux - main (test): skip
mipsletest if the emulator is missing - make: remove machine without board from smoketest
- stm32: add Arduino UNO Q to smoketests
- flake: bump to nixpkgs 25.11
- chore: update all github actions to latest versions
- fix: use external 7zip for scoop installs on Windows
0.40.1
An important point release with some critical fixes and improvements that just could not wait. Thank you very much to our global team of humans who joined together so quickly to get this out for all of us!
- machine
- nrf: fix flash writes when SoftDevice is enabled
- runtime
- libs
- picolibc: use updated location for git repo
0.40.0
Our final release for 2025 includes a number of really excellent improvements to close out the year. We have plenty of bugfixes and stability enhancements to make your life better and easier. For example, new updates to the GC that are up to 10% faster! Not to mention fixing some very tricky race conditions. Of course we have new hardware support, like the Xiao ESP32-S3 board.
- general
- all: add full LLVM 20 support
- core: feat: enable //go:linkname pragma for globals
- core: feature: Add flag to ignore go compatibility matrix (#5078)
- compiler
- emit an error when the actual arch doesn't match GOARCH
- mark string parameters as readonly
- use Tarjan's SCC algorithm to detect loops for defer
- lower "large stack" limit to 16kb
- core
- shrink bdwgc library
- Fix linker errors for runtime.vgetrandom and crypto/internal/sysrand.fatal
- fix: add TryLock to sync.RWMutex
- fix: correct linter issues exposed by the fix in #4679
- fix: don't hardcode success return state
- fix: expand RTT debugger compatibility
- internal/task (threads): save stack bounds instead of scanning under a lock
- internal/task: create detached threads and fix error handling
- interp: better errors when debugging interp
- transform (gc): create stack slots in callers of external functions
- internal/task: prevent semaphore resource leak for threads scheduler
- machine
- cortexm: optimize code size for the HardFault_Handler
- fe310: add I2C pins for the HiFive1b
- clarify WriteAt semantics of BlockDevice
- fix deprecated AsmFull comment (#5005)
- make sure DMA buffers do not escape unnecessarily
- only enable USB-CDC when needed
- use larger SPI MAXCNT on nrf52833 and nrf52840
- fix: update m.queuedBytes when clamping output to avoid corrupting sentBytes
- fix: use int64 in ReadTemperature to avoid overflow
- fix(rp2): disable DBGPAUSE on startup
- fix(rp2): possible integer overflow while computing factors for SPI baudrate
- fix(rp2): reset spinlocks at startup
- fix(rp2): switch spinlock busy loop to wfe
- fix(rp2): use side-effect-free spinlocks
- nrf: add ADC_VDDH which is an ADC pin for VDDH
- nrf: don't block SPI transfer
- nrf: don't set PSELN, it's ignored in single ended mode anyway
- nrf: fix typo in ADC configuration
- nrf: refactor SoftDevice enabled check
- nrf: rename pwmPin to adcPin
- nrf: support flash operations while the SoftDevice is enabled
- rp2040: allow writing to the UART inside interrupts
- machine,nrf528: stop the bus only once on I2C bus error and ensures the first error is returned
- net
- update submodule to latest commits
- runtime
- (avr): fix infinite longjmp loop if stack is aligned to 256 bytes
- (gc_blocks.go): clear full size of allocation
- (gc_blocks.go): make sweep branchless
- (gc_blocks.go): simplify scanning logic
- (gc_blocks.go): use a linked stack to scan marked objects
- (gc_blocks.go): use best-fit allocation
- (gc_boehm.go): fix world already stopped check
- (wasm): scan the system stack
- fix sleep duration for long sleeps
- remove copied code for nrf52840
- src/syscall: update src buffer after write
- wasm: fix C realloc and optimize it a bit
- targets
- build/test
- Add testing.T.Context() and testing.B.Context()
- create separate go.mod file for testing dependencies for wasm tests that use Chromium headless browser to avoid use of older incompatible version.
- go back to normal scheduler instead of tasks scheduler for macos CI
- update CI to use Go 1.25.5
- update macOS GH actions builds to handle sunset of macOS 13
- use task scheduler on macOS builds to avoid test race condition lockups
- update all CI builds to use latest stable Go release. Also update some of the actions to their latest releases.
- update GH actions builds to use Go 1.25.4
- uninstall cmake before install
- fix: point the submodule for musl-lib to a mirror in the TinyGo GitHub org
- fix: remove macOS 15 from CI build matrix (conflicts with macOS 14 build)
- fix: separate host expected bytes from device intended bytes
- fix/typo: makeESPFirmwareImage
- make: GNUmakefile: shrink TinyGo binaries on Linux
- move the directory list into a variable
- several improvements to the macOS GH actions build
- Fix for #4678: top-level 'make lint' wasn't working
- fix: increase the timeout for chromedp to connect to the headless browser used for running the wasm tests.
- testdata: some more packages for the test corpus
0.39.0
This release has what you need the most right now, which is Go 1.25 support! Of course it has other new features, such as adding multicore support for the RP2350 family of processors as well as for macOS. We've also got fixes, and as always further improvements for reflect support and stdlib packages. Plus a couple of new boards too!
- general
- all: add Go 1.25 support
- net: update to latest tinygo net package
- docs: clarify build verification step for macOS users
- Add flag to skip Renesas SVD builds
- build
- ci
- chore: update all CI builds to test Go 1.25 release
- fix: disable test-newest since CircleCI seems unable to download due to rate-limits on Dockerhub
- ci: rename some jobs to avoid churn on every Go/LLVM version bump
- ci: make the goroutines test less racy
- tests: de-flake goroutines test
- compiler
- compiler: implement internal/abi.Escape
- main
- main: show the compiler error (if any) for
tinygo test -c - chore: correct GOOS=js name in error messages for WASM
- main: show the compiler error (if any) for
- machine
- machine: add international keys
- machine: remove some unnecessary "// peripherals:" comments
- machine: add I2C pin comments
- machine: standardize I2C errors with "i2c:" prefix
- machine: make I2C usable in the simulator
- fix: add SPI and I2C to teensy 4.1 (#4943)
rp2: use the correct channel mask for rp2350 ADC; hold lock during read (#4938)rp2: disable digital input for analog inputs
- runtime
- runtime: ensure time.Sleep(d) sleeps at least d
- runtime: stub out weak pointer support
- runtime: implement dummy AddCleanup
- runtime: enable multi-core scheduler for rp2350
internal/task: use -stack-size flag when starting a new threadinternal/task: add SA_RESTART flag to GC interruptsinternal/task: a few small correctness fixesinternal/gclayout: make gclayout values constants- darwin: add threading support and use it by default
- standard library
sync: implement sync.Swapreflect: implement Method.IsExported
- testing
- testing: stub out testing.B.Loop
- targets
stm32: add support for the STM32L031G6U6- add metro-rp2350 board definition (#4989)
rp2040/rp2350: set the default stack size to 8k for rp2040/rp2350 based boards where this was not already the case
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)
0.37.0
This is probably our fastest time in-between full releases, especially given all of the excellent work that has made it in. A few highlights are updated compatibility with the latest WASI work from the Bytecode Alliance, faster speed and PIO support for the RP2350, and a new garbage collector option for Linux. Plus a bunch of critical fixes to make your life better!
- general
- add the Boehm-Demers-Weiser GC on Linux
- ci
- add more tests for wasm and baremetal
- compiler
- crypto/internal/sysrand is allowed to use unsafe signatures
- examples
- add goroutine benchmark to examples
- fixes
- internal
- update to go.bytecodealliance.org@v0.6.2 in GNUmakefile and internal/wasm-tools
- exclude certain files when copying package in internal/cm
- update to go.bytecodealliance.org/cm@v0.2.2 in internal/cm
- remove old reflect.go in internal/reflectlite
- loader
- use build tags for package iter and iter methods on reflect.Value in loader, iter, reflect
- add shim for go1.22 and earlier in loader, iter
- machine
- os
- add stub Symlink for wasm
- refactor
- use *SPI everywhere to make consistent for implementations. Fixes #4663 "in reverse" by making SPI a pointer everywhere, as discussed in the comments.
- reflect
- add Value.SetIter{Key,Value} and MapIter.Reset in reflect, internal/reflectlite
- embed reflectlite types into reflect types in reflect, internal/reflectlite
- add Go 1.24 iter.Seq[2] methods
- copy reflect iter tests from upstream Go
- panic on Type.CanSeq[2] instead of returning false
- remove strconv.go
- remove unused go:linkname functions
- riscv-qemu
- add VirtIO RNG device
- increase stack size
- runtime
- only allocate heap memory when needed
- remove unused file func.go
- use package reflectlite
- transform
- cherry-pick from #4774
0.36.0
- general
- add initial Go 1.24 support
- add support for LLVM 19
- update license for 2025
- make small corrections for README regarding wasm
- use GOOS and GOARCH for building wasm simulated boards
- only infer target for wasm when GOOS and GOARCH are set correctly, not just based on file extension
- add test-corpus-wasip2
- use older image for cross-compiling builds
- update Linux builds to run on ubuntu-latest since 20.04 is being retired
- ensure build output directory is created
- add NoSandbox flag to chrome headless that is run during WASM tests, since this is now required for Ubuntu 23+ and we are using Ubuntu 24+ when running Github Actions
- update wasmtime used for CI to 29.0.1 to fix issue with install during CI tests
- update to use
Get-CimInstanceaswmicis being deprecated on WIndows - remove unnecessary executable permissions
goenv: update to new v0.36.0 development version
- compiler
builder: fix parsing of external ld.lld error messagescgo: mangle identifier namesinterp: correctly mark functions as modifying memory- add buildmode=wasi-legacy to support existing base of users who expected the older behavior for wasi modules to not return an exit code as if they were reactors
- standard library
crypto/tls: add Dialer.DialContext() to fix websocket clientcrypto/tls: add VersionTLS constants and VersionName(version uint16) method that turns it into a string, copied from big gointernal/syscall/unix: use our own version of this packagemachine: replace hard-coded cpu frequencies on rp2xxxmachine: bump rp2350 CPUFrequency to 150 MHzmachine: compute rp2 clock dividers from crystal and target frequencymachine: remove bytes package dependency in flash codemachine/usb/descriptor: avoid bytes packagenet: update to latest submodule with httptest subpackage and ResolveIPAddress implementationos: add File.Chdir supportos: implement stub Chdir for non-OS systemsos/file: add file.Chmodreflect: implement Value.Equalruntime: add FIPS helper functionsruntime: manually initialize xorshift statesync: move Mutex to internal/tasksyscall: add wasip1 RandomGettesting: add Chdirwasip2: add stubs to get internal/syscall/unix to work
- fixes
- correctly handle calls for GetRNG() when being made from nrf devices with SoftDevice enabled
- fix stm32f103 ADC
wasm: correctly handle id lookup for finalizeRef callwasm: avoid total failure on wasm finalizer callwasm: convert offset as signed int into unsigned int in syscall/js.stringVal in wasm_exec.js
- targets
- rp2350: add pll generalized solution; fix ADC handles; pwm period fix
- rp2350: extending support to include the rp2350b
- rp2350: cleanup: unexport internal USB and clock package variable, consts and types
- nrf: make ADC resolution changeable
- turn on GC for TKey1 device, since it does in fact work
- match Pico2 stack size to Pico
- boards
- add support for Pimoroni Pico Plus2
- add target for pico2-w board
- add comboat_fw tag for elecrow W5 boards with Combo-AT Wifi firmware
- add support for Elecrow Pico rp2350 W5 boards
- add support for Elecrow Pico rp2040 W5 boards
- add support for NRF51 HW-651
- add support for esp32c3-supermini
- add support for waveshare-rp2040-tiny
- examples
- add naive debouncing for pininterrupt example
0.35.0
This is our last release of the year, and we've got plenty of presents for all of us tiny gophers!
We are happy to show improved error messages, and also a new HTML size report to help figure out what exactly is ending up in that binary.
There are several CGo improvements, such as support for function-like macros.
We've got a whole slew of improvements for reflection and runtime support, alongside several fixes and improvements for WASM.
New hardware! Support for the new RP2350 microcontroller, with the Raspberry Pi Pico2 and Pimoroni Tiny2350 boards.
And we are excited to bring our first software RISC-V running on FPGA to TinyGo with the newly added Tillitis TKey hardware device.
- general
- update cmsis-svd library
- use default UART settings in the echo example
goenv: also show git hash with custom build of TinyGogoenv: support parsing development versions of Gomain: parse extldflags early so we can report the error message
- compiler
builder: whitelist temporary directory env var for Clang invocation to fix Windows bugbuilder: fix cache paths in-size=fulloutputbuilder: work around incorrectly escaped DWARF paths on Windows (Clang bug)builder: fix wasi-libc path names on Windows with-size=fullbuilder: write HTML size reportcgo: support C identifiers only referred to from within macroscgo: support function-like macroscgo: support errno value as second return parametercgo: add support for#cgo noescapelinescompiler: fix bug in interrupt loweringcompiler: allow panic directly indefercompiler: fix wasmimport -> wasmexport in error messagecompiler: support//go:noescapepragmacompiler: report error instead of crashing when instantiating a generic function without bodyinterp: align created globals
- standard library
machine: modify i2s interface/implementation to better match specificationos: implementStartProcessreflect: addValue.Clearreflect: add interface support toNumMethodsreflect: fixAssignableTofor named + non-named typesreflect: implementCanConvertreflect: handle more cases inConvertreflect: fix Copy of non-pointer array with size > 64bitsruntime: don't call sleepTicks with a negative durationruntime: optimize GC scanning (findHead)runtime: move constants into shared packageruntime: addruntime.fcntlfunction for internal/syscall/unixruntime: heapptr only needs to be initialized onceruntime: refactor scheduler (this fixes a few bugs with-scheduler=none)runtime: rewrite channel implementation to be smaller and more flexibleruntime: useSA_RESTARTwhen registering a signal for os/signalruntime: implement race-free signals using futexesruntime: run deferred functions inGoexitruntime: removeCondwhich seems to be unusedruntime: properly handle unix read on directoryruntime/trace: stub all public methodssync: don't use volatile inMutexsync: implementWaitGroupusing a (pseudo)futexsync: makeCondparallelism-safesyscall: use wasi-libc tables for wasm/js target
- targets
mips: fix a bug when scanning the stacknintendoswitch: get this target to compile againrp2350: add support for the new RP2350rp2040/rp2350: make I2C implementation shared for rp2040/rp2350rp2040/rp2350: make SPI implementation shared for rp2040/rp2350rp2040/rp2350: make RNG implementation shared for rp2040/rp2350wasm: revise and simplify wasmtime argument handlingwasm: support//go:wasmexportfunctions after a call totime.Sleepwasm: correctly return from run() in wasm_exec.jswasm: call process.exit() when go.run() returnswindows: don't return, exit via exit(0) instead to flush stdout buffer
- boards
- add support for the Tillitis TKey
- add support for the Raspberry Pi Pico2 (based on the RP2040)
- add support for Pimoroni Tiny2350
0.34.0
This release adds support for //go:wasmexport that is a standardized way to export WebAssembly functions to the host, improves garbage collection performance (especially on wasm), adds big-endian MIPS support (GOOS=mips), and adds two new boards! It also contains a number of smaller improvements and bug fixes.
- general
- fix
GOOS=wasip1fortinygo test - add
-C DIRflag - add initial documentation for project governance
- add
-ldflags='-extldflags=...'support - improve usage message with
tinygo helpand when passing invalid parameters
- fix
- compiler
builder: remove environment variables when invoking Clang, to avoid the environment changing the behaviorbuilder: check for the Go toolchain version used to compile TinyGocgo: addC.CBytesimplementationcompiler: fix passing weirdly-padded structs as parameters to new goroutinescompiler: support pragmas on generic functionscompiler: do not let the slice buffer escape when casting a[]byteor[]runeto a string, to help escape analysiscompiler: conform to the latest iteration of the wasm types proposalloader: don't panic when main package is not named 'main'loader: make sure we always return type checker errors even without type errorstransform: optimize range over[]byte(string)
- standard library
crypto/x509: add package stub to build crypto/x509 on macOSmachine/usb/adc/midi: fixPitchBendos: addTruncatestub for baremetalos: add stubs foros.Filedeadlinesos: add internalnet.newUnixFilefor the net packageruntime: stub runtime_{Before,After}Exec for linkageruntime: randomize map accessesruntime: supportmaps.Cloneruntime: add more fields toMemStatsruntime: implement newcoro, coroswitch to support package iterruntime: disallow defer in interruptsruntime: add support for os/signal on Linux and MacOSruntime: add gc layout info for some basic types to help the precise GCruntime: bump GC mark stack size to avoid excessive heap rescans
- targets
darwin: use Go standard library syscall package instead of a custom onefe310: support GPIOPinInputmips: fix compiler crash with GOMIPS=softfloat and defermips: add big-endian (GOARCH=mips) supportmips: use MIPS32 (instead of MIPS32R2) as the instruction set for wider compatibilitywasi: add relative and absolute --dir options to wasmtime argswasip2: add wasmtime -S args to support network interfaceswasm: add//go:wasmexportsupport (for all WebAssembly targets)wasm: use precise instead of conservative GC for WebAssembly (including WASI)wasm-unknown: add bulk memory flags since basically every runtime has it now
- boards