Skip to content

Moddable SDK 8.0.0

Choose a tag to compare

@mkellner mkellner released this 14 Apr 03:04

Moddable SDK 8.0 contains improvements made between March 13, 2026 and April 13, 2026.

ESP-IDF v6

We've upgraded to the new ESP-IDF v6 from Espressif. This is a required update for ESP32 development with the Moddable SDK. Our documentation provides instructions for updating. If you forget, the build will remind you when you build for ESP32 targets.

ESP-IDF v6 is a big change – especially to the build system. We've tried to make it transparent for Moddable SDK developers. To better support the new ESP-IDF build, we now allow Moddable SDK project manifests to specify built-in IDF components to include in the build. This simplifies adding JavaScript bindings for ESP-IDF modules.

TypeScript 6

Microsoft recently announced TypeScript 6. This is a major update with some breaking changes, especially to build systems. TypeScript 6 is a stepping stone for Microsoft to a reimplemented, faster TypeScript 7. We've updated the Moddable SDK build system to work with TypeScript 6. We've gone from transpiling all TypeScript in a single invocation of tsc to invoking tsc once for each TypeScript source file. This is necessary to map source paths to the output paths as required by the Moddable SDK build. We also believe it fixes some existing (unreported) failures. It has worked reliably in our testing. However, because the change is significant, please test your projects and report any issues.

Optimized JavaScript stack

We've reduced JavaScript stack use by reworking the JavaScript stack frame used by XS for function calls. All function calls eliminate the slot that previously stored the argument count by merging it into an unused field of another slot. All ordinary function calls, basically anything except constructors invoked with new, also eliminate the slot that previously stored new.target. In addition, the changes allowed us to remove the slot used to store new.target from all arrow functions created outside a constructor.

These optimizations minimize function calling overhead, speed garbage collection, and reduce the potential for JavaScript stack overflows. Perhaps some projects can even reduce their JavaScript stack allocation. While the benefits are small on each operation, they add up. These improvements require no changes to existing code – scripts just run a bit lighter.

Touch for Alloy, Embedded JavaScript on PebbleOS

We've implemented an ECMA-419 Touch driver for Alloy, the Moddable SDK runtime for PebbleOS. Touch is available to apps using Poco by directly instantiating the driver and to apps using Piu through the familiar onTouchBegan, onTouchMoved, and onTouchEnded events. Alloy examples are available for Poco and Piu Performance is great. Moddable is excited to bring this new capability to PebbleOS and we look forward to seeing how developers use it in their Alloy projects. (Note that touch will be available to Alloy developers once integrated into a future Pebble SDK release).

xsdb

xsdb is an all-new command-line JavaScript debugger that complements xsbug, our graphical JavaScript debugger. xsdb is for embedded developers already familiar with gdb and for automated tools that need to interact with running JavaScript, from automated test harnesses to LLMs. Unlike gdb, xsdb doesn't require complicated setup. Check out our xsdb documentation to learn the fundamentals.

We'd appreciate your feedback on xsdb to help guide its development.

test-examples

The Moddable SDK contains a huge number of example projects. Ensuring that those build and run on every target device is a massive undertaking, and mistakes happen. We created test-examples to help. It performs batch builds of projects from a directory and runs each one. It uses our new xsdb debugger to validate that each example runs cleanly without any unhandled exceptions or promise rejections. While this isn't a deep API compatibility test (we have testmc for that), it does identify real issues and contribute to a smoother developer experience. You can use test-examples on your own projects too or review the code to learn how to build your own automated tools using xsdb. Our test-examples documentation will get you started.

Waveshare Touch AMOLED 2.06" Watch Development Board

We've added a port to the Waveshare Touch Watch Development board. This low-cost board contains an ESP32-S3 and runs our conversationalAI app nicely. The port includes a new CO5300 display driver, a new FT3168 touch driver, and more. It was contributed by @dashersw. Thank you!

Zephyr Tech Talk

We continue to improve our Zephyr support. This release adds runtime support for mods (user installed extensions). We hope to add support for mcrun to install mods on Zephyr.

Moddable joined a Zephyr Tech Talk this month to talk about Embedded JavaScript on Zephyr and demo some of our latest work, including mods and xsdb. Check out the fast paced dicsussion hosted by Benjamin Cabé of the Linux Foundation.

Details

The details that follow do not include the items covered above.

  • Alloy – Embedded JavaScript on PebbleOS
    • Updated Piu TypeScript declarations
    • Merged changes to make instrumentation traces optional (contributed by @jplexer)
    • Draw circle works around graphics_fill_circle limitation
    • Poco bitmap fills now work with gray4 and ARGB2222 bitmaps
    • Fix HTTP requests that include a request body (Moddable-OpenSource/pebble-examples#5) (reported by @stc1988 and @vincentezw)
    • Properly sandbox keyValue storage #1590 (reported by Pebble community)
    • Report exceptions that occur when loading main rather than falling into abort handler
    • Restore lost color text fix (coredevices/pebble-tool#42)
  • Modules
    • Fix linking of mod-enabled builds on microcontroller hosts
    • chatAudioIO – merge PR to expose model to applications (contributed by @stc1988)
    • DNS (contributed by @rootvector2)
      • Fix buffer overruns parsing malformed DNS packets
      • Compress names when serializing DNS packets (generates smaller, standards conformant packets)
  • ECMA-419
    • File system implementations for all platforms updated to match standard
      • Unimplemented functions are omitted rather than throwing (for cleaner feature detection)
    • Zephyr builds with I2C interfaces now include SMBus class
    • Fix UUID handling in Zephyr BLE central to allow Web Bluetooth Client example to work
  • XS JavaScript engine
    • Fix build failures introduced by obscure ES2026 Math.sumPrecise()
  • Contributed
    • conversationalAI adapts to device screen size (previously locked to 240 x 320)
  • Devices
    • Raspberry Pi Pico
      • Builds respect UF2CONV environment variable
      • Fix Wi-Fi
    • ESP32
    • Zephyr
      • Workaround for inconsistent driver interpretation of 16-bit pixels
    • Linux
      • Link ALSA drivers when using Audio In or Audio Out #1596 (contributed by @meganetaan)
  • Tools
    • Rework mcrun to eliminate -f x in Pebble builds
    • serial2xsbug
      • Rework mod install to support Zephyr flash restrictions
      • -hideunrecognized option to suppress output of unexpected serial port data
    • mcsim and xsbug launch reworked to avoid crash on start when file and appearance notifications happen in unanticipated order
    • mcsim works with ECMA-419 display devices (contributed by @HipsterBrown)
    • mcconfig now supports -dl for Zephyr builds
    • strip option in manifests now fully supported on Zephyr (explicit strip list previously failed)
    • Zephyr build respects VERBOSE environment flag
  • TypeScript
    • Updated declarations for correctness
    • Update Poco declarations for cleaner patching by platforms (Pebble) and modules (Outline, GIF, QR Code, etc.)
    • Add typings for mod/config (contributed by @stc1988)
    • Bumped the JavaScript version to es2025 (there is no es2026 yet in TypeScript)

Contact Us

If you have questions or suggestions about anything here, please reach out: