TinyGo 0.45 - Reflect On This

The TinyGo 0.45 release is here, just in time to keep you busy through the holidays. It is a big one with over 560 commits. The compiler is faster, your programs are faster, and a lot more Go code now compiles and runs without any changes at all. We also have new hardware, new tools, and some love for the venerable boards that have been around for a while.
One note before we start. TinyGo 0.45 requires Go 1.26 or newer. See the Go compatibility matrix for the details.
Faster, With More Go
As usual, we put a lot of work into the compiler itself, but this release goes a lot further. It now creates common types, constants, and attributes only once, it avoids a lot of copying, and the loader typechecks independent packages more quickly. The interp package also uses less time and memory per call. You will really notice it reduce compile times on bigger programs.
The code that the compiler produces got faster too. Escape analysis is smarter, so more values stay on the stack instead of going to the heap. Read-only uses of a []byte no longer need a copy to a string. Interface method calls and type asserts now switch on a type ID. Comparing a string to "" is now just a length check, and zeroing a slice in a loop becomes a single memset.
The runtime is not left out of the performance upgrade bonanza. The heap now grows before it gets too full, timers live in a binary min-heap, and the GC works through its block states a byte at a time. On hosted targets, slices now grow the same way that they do in “Big” Go.
Reflect On This
The reflect package has always been one of the trickiest parts of Go for TinyGo to support. This release adds SliceOf, MapOf, ArrayOf, ChanOf, StructOf, and FuncOf. You can call functions and methods with Value.Call and CallSlice, build new functions with MakeFunc, and do channel operations. Iterators work with Seq and Seq2 too.
Lots of existing Go packages lean on reflection, so this means that many more of them now just work with TinyGo. Give it a try on your own code, you will like what you see.
Standard Library
More of the standard library passes its own tests than ever before. Packages like context, crypto/cipher, encoding/binary, math/bits, and math/rand all pass now. Take a look at the updated list of supported packages to see where things stand.
On Linux, the os package now starts processes using posix_spawn, and supports Process.Wait, Kill, and Signal. The testing package prints benchmark results in the same format as go test, so your usual tools can read them. It also supports -test.timeout now.
ESP32xx: More Of Everything

Our support for the extremely popular Espressif chips keeps getting better with every release, and 0.45 is no exception.
We are very happy to welcome the new ESP32-P4 to the family! This is a powerful RISC-V chip intended for Human-Machine Interface (HMI) applications, and TinyGo runs it at 360 MHz. The initial support includes USB serial, PSRAM, GDMA, clock control, I2C, SPI, the FPU, and the cores scheduler so you can achieve maximum performance. There are three new ESP32-P4 boards to choose from:
Other modern ESP32-family processors such as ESP32-C3, ESP32-C6, and ESP32-S3 also picked up lots of new features:
- A new
machine/watchdogpackage, with watchdog support. CPUResetandResetReasonso you can find out why your board restarted- Capacitive touch sensor support with the new
machine/touchpackage on the ESP32-S3 - WiFi on the ESP32-C6 with the espradio package
- PWM, SPI,
machine.Flash, and the true random number generator on the ESP32-C6 - Octal PSRAM support on the ESP32-S3, and
CPUFrequencyfor all ESP32-S3 boards
We also fixed a large number of issues with I2C, UART, and SPI across the ESP32xx family. Most of the code for these peripherals is now shared between the chips, which will help as we continue to add more supported processors.
New ESP32xx boards in this release:
RP2040 And RP2350: All Cores, (Almost) All The Time
The cores scheduler on the RP2040 and RP2350 had a real workout since our last release, and it is now even more solid. Interrupts are masked while the scheduler lock is held, a deadlock when the timer queue grew has been fixed, and the GC now scans the stack of the goroutine that is running. The multicore code for waiting, waking, sleeping, spinlocks, and the GC is now shared between all of the targets that support cores.
An upcoming release will leave cores on as the default for all boards that support it. For now you need to choose it when you compile using the -scheduler=cores flag.
Other RP2040 and RP2350 improvements include:
- Support for the BOOTSEL button
- PSRAM support for the Pimoroni Pico Plus 2
CPUResetnow uses the watchdog- Faster SPI receive, and smaller I2C transfers
- UART
SetFormat,SetBaudRate, andConfigurenow do what you ask them to do - No more heap allocations during clock setup
Old Boards, New Tricks

Not every board in your drawer is brand new, and that is more than fine with us. Welcome to the club! Many are still working perfectly, and we want to help get all we can out of this treasure trove of usable gear.
The classic ESP32 can now use both of its cores with the cores scheduler. It also has PSRAM support for WROVER modules, a hardware random number generator with GetRNG, watchdog support, and capacitive touch. Dust ’em off and put them to work!
The AVR based Arduino boards got a lot of attention as well. I2C is much more reliable, with fixes for NACK detection, stop conditions, the address probe, the prescaler, and pull-ups. The ATmega1280, ATmega2560, and ATmega1284P now have I2C0, and SPI0 works on them too. The serial monitor now opens at 9600 baud for ATmega targets, so you see your output right away instead of garbage.
Also showing the love for new Arduino boards, we added the Arduino Nano R4, and the RA4M1 chip in it now has a USB CDC driver.
New Tools And Examples
There are several new tools to help you understand what your code is really doing:
- The new
-print-boundsflag shows the bounds checks that the compiler could not remove, so you know where to look when you want to go faster wasmprofconverts wasmtime guest profiles to pprof format, so you can profile your WebAssembly with the usual Go toolsupdate-binary-sizesandplot-binary-sizetrack how big programs are from one release to the next- The new
-libc=glibcoption lets you link with system shared libraries on Linux tinygo flashnow gets the ESP flash offset from the updated espflasher
And two new examples:
i2c-scanscans the I2C bus and prints the addresses that respond as a grid, just likei2cdetectreplis a small monitor that reads and writes memory mapped registers over the serial port, great for exploring new hardware
These are only some of the features and fixes in this release. See the CHANGELOG for the complete list.
Thank You, Team TinyGo!
Every release we thank the team and supporters, but this one really shows the commitment of the committers, reviewers, and testers, with over 16 commits merged PER DAY. Thank you everyone who made this possible!