TinyGo 0.45.0 Released github.com · 41 points · 4 comments · HN thread TL;DR Tin...
HN Best 200 @best
TinyGo 0.45.0 Released github.com · 41 points · 4 comments · HN thread
TL;DR TinyGo 0.45.0 is released, described as its largest release with more than 560 commits since 0.44.0. It raises the minimum Go version to 1.26 and adds much more complete reflect support, posix_spawn-based process handling on Linux, a faster compiler, new runtime timer and heap work, and expanded hardware support including initial ESP32-P4.
- TinyGo now requires Go 1.26 or newer.
- reflect gains StructOf, FuncOf, MapOf and similar constructors, Value.Call and MakeFunc, and channel operations.
- On Linux, os starts processes with posix_spawn, adding Process.Wait, Kill and Signal.
- The runtime adds Pinner, keeps timers in a binary min-heap, and changes heap growth to grow when less than half is free.
- Hardware: initial ESP32-P4 support, cores scheduler on original ESP32, PSRAM on ESP32 WROVER, ESP32-S3 Octal and Pico Plus 2, a new machine/watchdog package, and capacitive touch on ESP32 and ESP32-S3.
- New boards include Waveshare ESP32-P4-NANO, Elecrow CrowPanel ESP32-P4, Adafruit ESP32-S3 Feather TFT and Arduino Nano R4.
Discussion The thread is small, with only a handful of comments. It starts with a commenter saying they use TinyGo to generate WebAssembly and that Go's GC and goroutine infrastructure makes it a weaker WASM language than Rust, though TinyGo works well. A reply asks how to build for a WebAssembly target, and the asker describes a distributed computing project that compiles to C++ and wonders whether TinyGo could replace Emscripten. The mood is practical and low-key, with a brief self-promotional aside that the asker did not take up.
- TinyGo works well for WebAssembly, though Go is weaker than Rust for WASM (some): One commenter uses TinyGo to generate WASM and says it works well, but argues that Go's GC and goroutine infrastructure make it a less good WASM language than Rust, which produces a simpler binary.
- Interested in TinyGo as an alternative to Emscripten (a few): A commenter running a distributed computing project asks how to build with a WebAssembly target and whether TinyGo could replace Emscripten for compiling their subset-of-operations code, to avoid downloading qemu appliances.
Links from the comments