github tinygo-org/tinygo v0.43.0
0.43.0

3 hours ago

In our latest release, we have over 160 commits to our main repo, with a major focus on Go compatibility and correctness. The runtime now supports synctest, NumGoroutine, and panic recovery on Xtensa and on WebAssembly without exceptions. The testing package adds parallel tests, AllocsPerRun, and B.SetParallelism, and reflect adds NewAt, Slice3, SetCap, and FieldByIndexErr. The GC now uses precise layouts and scans globals precisely on all platforms, and the new -trimpath flag gives you reproducible builds. On the hardware side, there is I2S audio for ESP32 and nRF52, USB mass storage on nRF52840, USB CDC for Teensy 4.x, PWM on ESP32, and many I2C fixes for the ESP32 family. There is also the new ESP32-H2 chip, and new boards like the Waveshare RP2040-PiZero and RP2350-PiZero and the Pimoroni Tufty 2350.

  • general
    • all: update picolibc to latest main, enable freopen, and remove stale workarounds (#5570)
    • main: give the program access to stdin on tinygo run (#5706)
    • binaryen: update to version 133 (#5732)
    • drop "devel " version prefix handling due to Go 1.25 changed version reporting (#5735)
  • compiler
    • compiler: support panic recovery without exceptions, and reuse Asyncify panic catchers (#5550)
    • compiler: reduce Asyncify catcher stack usage (#5550)
    • compiler: skip unwinding for safe calls (#5550)
    • compiler: conservatively handle new SSA instructions (#5550)
    • compiler: implement go:cgo_import_dynamic and lower Darwin cgo import trampolines (#5604, #5612)
    • compiler: optimize non-blocking single-case selects (#5500)
    • compiler: optimize large array comparisons (#5752)
    • compiler: avoid byte slice copies in string equality and ordered string comparisons (#5765, #5773)
    • compiler: reject impossible slice allocations (#5752)
    • compiler: bound aggregate call signatures (#5625)
    • compiler: fix 64-bit sin and cos on AVR (#5570)
    • compiler: add debug info to synthetic wrapper functions (#5747)
    • compiler: make equal-position member ordering deterministic (#5711)
    • compiler, reflect: preserve runtime type identity (#5825)
    • builder: add -trimpath support, and make trimmed builds reproducible (#5711)
  • core
    • reflect: implement NewAt, Slice3, SetCap, and FieldByIndexErr (#5812, #5813, #5815)
    • reflect: fix the map iterator state (#5814)
    • reflect: fix Elem for named multi-pointer types (#5718)
    • reflect: format invalid values (#5716)
    • reflect: do not mark zero values read-only (#5725)
    • sync: hand the RWMutex over instead of a re-test of the reader count (#5697)
    • crypto/rand: implement Text (#5720)
    • crypto/tls: return Conn from dial functions (#5726)
    • testing: implement parallel tests, and report the parallel test state (#5715)
    • testing: implement AllocsPerRun and B.SetParallelism (#5772, #5731)
    • testing: run benchmark cleanup functions (#5713)
    • testing: order verbose subtest results (#5715)
    • runtime/debug: populate BuildInfo so ReadBuildInfo works (#5592)
    • runtime/debug: add SetTraceback compatibility stub (#5719)
    • runtime, runtime/pprof: add Func.Entry and goroutine labels (#5646)
    • internal/abi: add PC-line table magic values (#5771)
    • builder: add debug info to runtime.initAll (#5746)
    • builder: trim Clang builtin header paths and omit C command lines from trimmed debug info (#5711)
    • loader: precompute recorded source directories (#5711)
    • interp: resize ptrtoint and inttoptr results (#5745)
    • interp: evaluate fastrand without the global RNG state (#5722)
    • transform: root every input of a tracked phi in a loop (#5751)
    • transform: follow phi inputs only through phis that can repeat (#5762)
    • transform: track escapes through nested aggregate results (#5776)
    • transform: reuse GC stack slots for repeated pointer tracking (#5766)
  • runtime
    • implement synctest (#5649)
    • implement NumGoroutine (#5728)
    • support panic recovery on Xtensa (#5653)
    • preserve the Wasm panic traceback (#5550)
    • classify standard panic messages (#5739)
    • add a weak.Pointer.Value compatibility shim (#5714)
    • report the configured Go root (#5717)
    • yield the thread in Gosched on the threads scheduler (#5764)
    • exit coroutines before resuming callers, and release completed Asyncify stacks (#5550, #5738)
    • block signal_recv on targets without signal delivery (#5620)
    • avoid heap allocations for plain errors, in printitf, in runGC, and while stopping the world (#5480, #5721, #5729, #5730)
    • gc: require explicit GC layouts, and precisely scan globals on all platforms (#5575)
    • gc: use precise layouts with Boehm GC, eagerly mark Boehm global roots, and reduce typed allocation overhead (#5575, #5686)
    • gc: fix multicore RISC-V GC synchronization (#5682)
    • cgo: preserve malloc allocations until free (#5575)
    • wasm: keep one pending scheduler wakeup instead of leaking a timer chain (#5622)
    • cores: add a secondary core startup barrier (#5737)
    • xtensa: jump indirectly to longjmp (#5677)
  • machine
    • usb/msc: add USB mass storage support on nRF52840 (#5794)
    • usb/msc: read the block device outside the USB interrupt (#5808)
    • usb/msc: reset the MSC state when the host sets the configuration (#5809)
    • usb/msc: fix stalls and split writes at raw blocks (#5794)
    • usb/msc: send the CSW when an OUT command fails (#5817)
    • usb/cdc: send a ZLP when TX ends on a full packet (#5795)
    • nrf52840: fix USB endpoint 3 and EasyDMA ownership, and clear EPDATASTATUS before the EPDATA handlers run (#5794)
    • nrf52xxx: add I2S support (#5786)
    • nrf: stop the RNG after each read (#5851)
    • esp32xx: add I2S support (#5787)
    • esp32: add PWM support using the LEDC peripheral (#5669)
    • esp32xx: share the LEDC channels and fix SetInverting (#5669)
    • esp32xx: fix PWM above 78 kHz and lost duty updates (#5790)
    • esp32xx: fix I2C commands, FIFO reset, and the last byte read, and clear the bus with a GPIO STOP when configuring (#5774, #5783)
    • esp32: fix I2C timeouts on larger transfers (#5674)
    • esp32: route GPIO pin interrupts to the PRO CPU (#5688)
    • esp32: handle the alloca exception (#5689)
    • esp32: avoid sync.Once during startup (#5653)
    • esp32c6: add default UART0 pins, and move the UART interrupt off CPU interrupt 7 (#5755, #5756)
    • mimxrt1062: add USB device (CDC) support for Teensy 4.x (#5691)
    • rp2: use blocking FIFO writes for multicore handshakes, and check FIFO_ST.VLD in the SIO FIFO interrupt handler (#5709, #5723)
    • rp2040: avoid XIP hangs during flash operations with scheduler=cores (#5411)
    • rp2350: pause the other core during flash operations with scheduler=cores (#5806)
    • rp2350: set ACTLR.EXTEXCLALL on each core (#5708)
    • nrf: fix a missed RTC wakeup (#5832)
    • mimxrt1062: use Normal memory attributes for ITCM and DTCM (#5690)
    • esp32xx: make the timer tick period a per-chip constant (#5749)
  • targets
    • add ESP32-H2 support and the ESP32-H2-DevKitM-1 board (#5750)
    • add Waveshare RP2040-PiZero (#5675)
    • add Waveshare RP2350-PiZero (#5670)
    • add Pimoroni Tufty 2350 (#5658)
    • nrf52840: use an 8 KB default stack (#5816)
    • esp32: add Bluetooth controller ROM symbols and reserve its memory (#5689)
    • esp32: align the heap to 16 bytes on the esp32 family (#5789)
    • esp32c6: align .rodata to its flash offset (#5755)
  • examples
    • add the i2s-tone example with esp32xx pins (#5786, #5787)
    • docs: remove ASD-STE100, just tell coding tools to keep it simple and direct (#5753)
  • build/test
    • ci: build the compiler image on a prebuilt LLVM image (#5671)
    • ci: split assert-test-linux and the macOS jobs so they run at the same time (#5664, #5666)
    • ci: share LLVM setup steps, and include Xtensa in size comparisons (#5654)
    • ci: update Wasmtime to 48.0.2 LTS (#5741)
    • make: allow updating LLVM sources, and avoid fetching the available LLVM revision (#5672, #5685)
    • make: test bytes, slices, strings, iter, go/printer, and net/netip on hosted platforms (#5727, #5738, #5752, #5769)
    • make: enable recovered wasm package tests, and run the slowest stdlib tests with -short (#5550, #5663)
    • builder: add a representative binary size test (#5770)
    • test: run panic recovery on ESP32 QEMU (#5653)
    • testdata: add regression tests for GC roots across loop phis and aggregate escapes (#5751, #5776)

Don't miss a new tinygo release

NewReleases is sending notifications on new releases.