Urgent.News

What's breaking now, across thousands of outlets.

Tech

TinyGo 0.42 - Recover Is Real

TinyGo 0.42, the latest update to the TinyGo compiler, has been released and it brings significant improvements to error handling and expands TinyGo's reach to new hardware platforms. In this release, runtime panics can now be recovered from, providing developers with greater control over their programs. Previously, a nil pointer dereference or a divide by zero in a TinyGo program would cause it to simply stop running, but now these errors can be handled through defer and recover, similar to how they are handled in traditional Go programs.

Additionally, TinyGo has added support for Go version 1.27, allowing the compiler to take advantage of new features such as generic methods. The binaries released with the compiler are now built and tested with this newer Go version. The compiler has also been moved to LLVM 22, although previous versions of LLVM (19, 20, and 22) are still supported for those who build from a distribution package.

Furthermore, TinyGo 0.42 has expanded its reach to a wide variety of hardware platforms. On Windows, a vectored exception handler has been added to allow for the same kind of panic recovery as on other platforms. The runtime now knows which panics can be handled and which cannot, ensuring that unrecoverable errors such as out of memory conditions are still properly managed.

TinyGo has also added a minimal UEFI target, allowing developers to write Go programs that can run as UEFI applications on compatible hardware before an operating system starts. This is particularly exciting for the ESP32 chips, which have powerful wireless capabilities. With interrupt support, timer alarms, and flash XIP support, these chips can now do much more than they could before.

Additionally, Bluetooth support has been added for the ESP32-C3 and ESP32-S3 chips, further expanding TinyGo's reach in the world of wireless devices.

The release also includes improvements to the USB support, with endpoints now being registered dynamically to support bidirectional communication with RP2, SAMD21, SAMD51, and nRF52840 chips. The USBDevice.Attach and USBDevice.Detach methods have also been added, providing even more flexibility for developers. Overall, TinyGo 0.42 is a significant step forward for the TinyGo compiler, expanding its usefulness and capabilities across a wide range of hardware platforms.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at tinygo.org →

More in Tech

I'm trying to convince myself not to buy Mac Studio. Apple isn't helping.

フル装備の Mac Studio は必要ない、と自分を説得しようとしている。 うまくいっていない。 Apple の新しい Mac Studio はばかげたデスクトップだ。最大 512GB のユニファイドメモリに、1.2TB/s のメモリ帯域幅。さらに重要なのは、Apple がこれを明確にオンデバイスの AI…

What Does an Industrial AIoT System Actually Need?

AIoT sounds simple on paper: connect devices, collect data, apply AI, and get useful insights. In a real industrial environment, however, there are several layers between a physical device and a…

  • Connected hardware generates data about surroundings
  • Connectivity transmits data to software system
  • Data pipelines clean and organize information

Why I left Duolingo after a 1,000-day streak

Cómo la gamificación puede distraer de aquello que construiste. Hoy Duolingo me felicitó por algo que debería haber sido un logro. Una racha de 1.000 días. La pantalla que me hizo abandonar.

  • User stopped using Duolingo after 1,000 days
  • Gamification distracted from actual learning
  • Learning became about opening app, not studying

More from Wednesday 2 September →