Skip to content

Moddable SDK 8.2.0

Choose a tag to compare

@mkellner mkellner released this 03 Jun 23:52

Moddable SDK 8.2 contains improvements made between May 7, 2026, and June 3, 2026.

It has been another busy month in the Embedded JavaScript universe. Thanks to the many developers who have shared their experiences, knowledge, and time to help make the Moddable SDK better for everyone. Read on to learn how we're making Embedded JavaScript the most reliable, powerful, and easiest way to create software for embedded devices.

xsbug for Pebble Alloy

Developing apps for Pebble watches using Alloy is about to get a lot easier. We're bringing support for xsbug, our powerful JavaScript debugger, to Pebble. We've integrated support for the XS debugging protocol for Pebble into this release, transporting all communication between Pebble and xsbug over Pebble's internal messaging infrastructure. This means that all capabilities of xsbug, including conditional breakpoints, function breakpoints, an interactive REPL, tracepoints, and advanced performance profiling, will soon be available to Pebble developers to debug and optimize their applications. Stay tuned for an update to the Pebble SDK that includes JavaScript debugging.

Home Assistant

Home Assistant support has landed in the Moddable SDK. You can use it to turn any microcontroller into a home controller. If you aren't already familiar, Home Assistant is the popular open-source solution for managing all the connected devices in your home. It provides vendor-neutral management of devices across IoT ecosystems and works remarkably well. This release of the Moddable SDK supports the Home Assistant WebSocket API using the official npm home-assistant-js-websocket package to provide low-latency, lightweight device status and control.

We've added four new examples to get you started:

  1. Discover lists all the devices your Home Assistant installation has found.
  2. Blink turns a lightbulb on and off based on a timer.
  3. Blink-ts is exactly like Blink, but in TypeScript.
  4. Button turns a lightbulb on and off using a button on your development board.

Lots of ECMA-419

We are pushing hard to migrate the Moddable SDK to standard ECMA-419 Embedded JavaScript APIs. This means deprecating many of our original APIs, including "pins" for IO and network/wifi module. This release uses ECMA-419 Wi-Fi for most microcontroller hosts. In addition to a simpler, modern API, this brings support for static IP addresses and hostnames.

The 4th Edition of ECMA-419 is expected to be ratified later this month. It includes extensions to Digital and DigitalBank for initialValue and activeLow options. These options are supported in this Moddable SDK, and our modules and examples have been updated to use them.

While we don't have a precise timeline for cutting completely over to ECMA-419 APIs, the work is active and we hope to complete it in the coming months. We recommend migrating your projects. If you have questions, please reach out to us at the contacts below.

Asynchronous Touch Driver

An underappreciated feature of ECMA-419 is fully asynchronous I²C and SMBus operations. Clock stretching is a feature of I²C and SMBus that allows a peripheral to take time responding to requests. Using synchronous requests, this can block. With some touch drivers, the profiler in xsbug shows that this can take between 5 and 10% of total execution time. Asynchronous I²C and SMBus drop this to almost zero. This release of the Moddable SDK refreshes the asynchronous version of our FT6206 touch driver and makes it the default on the M5Stack Core S3, reducing overall latency and giving back more CPU time to apps.

RGB565 Big-Endian Pixels

Just about every microcontroller is little-endian (even those that support big-endian run almost exclusively in little-endian mode). This makes it natural and efficient for graphics engines to render pixels in little-endian format. Unfortunately, for historical reasons, most frame buffers expect pixels in big-endian format. In some cases, the microcontroller has hardware support to convert little-endian pixels to big-endian with no overhead. Unfortunately, this isn't always the case – for example, the new CO5300 driver and Zephyr display drivers introduce measurable overhead, reducing the frame rate. This release of the Moddable SDK has the ability to render pixels in RGB565 big-endian format, eliminating the need for conversion. Big-endian pixels are ever so slightly slower to render on little-endian microcontrollers. But when the driver requires big-endian pixels and no hardware conversion is available, big-endian can be significantly faster overall.

There's another factor: cameras. Because frame buffers tend to want big-endian pixels, cameras tend to provide big-endian pixels. For devices displaying camera input, big-endian pixels can be an even bigger boost. We've seen meaningful increases in frame rate for cameras using big-endian pixels. This release makes RGB565 big-endian pixels the default for M5Stack CoreS3 to better support its built-in camera and for the Waveshare Amoled 206 to improve performance of its CO5300 display driver.

Details

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

  • Modules
    • Poco
      • Fix crash on missing glyph (reported by @stc1988) #1606
      • Missing accented characters substitute unaccented character
      • Implement RGB565 Big Endian rendering (faster for some display drivers)
    • Crypt
      • AES optimizations
      • Reduce GC churn by reducing re/allocations
    • Audio Out
    • Drivers
      • CO5300 display driver
        • Optimized rotation support (contributed by @kitazaki) #1605
        • Supports RGB565 BE pixels
      • FT6206 asynchronous driver working again and synchronized with synchronous version
      • Add Si12T touch driver (contributed by @stc1988)
    • ChatAudioIO
      • Add support for Gemini 3.1 Flash Live and GPT Realtime 2 (contributed by @stc1988)
  • ECMA-419
    • Audio Out on ESP32 eliminates block during write by only using full DMA buffers
    • File module conformance improvements and bug fixes
    • ECMA-419 Wi-Fi
      • Used by all MCU hosts to establish Wi-Fi connection (setup/network)
      • Supports static IP address
      • Supports setting hostname
    • ECMA-419 Ethernet
      • Supports static IP address
      • Supports setting hostname
    • ECMA-419 Digital and Digital Bank
      • Support activeLow to automatically invert (previously only on Zephyr)
      • Support initialValue to set initial state without glitch
    • ECMA-419 HTTP Server sets correct status text
    • Asynchronous I²C and SMBus are working again
    • I²C on ESP32 is again using persistent device & bus – more efficient
    • WebSocket defines readyState constants for web compatibility
  • Platforms
    • Pebble
    • ESP32
      • M5Stick and M5Stick Cplus
        • Use ECMA-419 drivers (contributed by @stc1988)
        • Optional power button support
      • M5Stack CoreS3 uses Big Endian 565 Pixels (faster with camera) and async FT6206 touch driver (non-blocking)
      • M5AtomS3R supports BMI270 IMU (contributed by @kitazaki)
      • Waveshare Amoled 206
        • Uses RGB565 BE pixels (faster)
        • Defines screen.corner so apps can adapt
      • No longer providing a default for SPI pins to eliminate surprising collisions. This will break existing code that depends on the defaults, but we haven't seen that yet.
    • Pico
      • ws_round and ws_round_touch targets support QMI8658 IMU (Contributed by @stc1988)
    • Web Assembly
      • Promises now work (Contributed by @meganetaaan)
      • Build fixes, support for latest emscripten #1615
  • XS JavaScript engine
    • Parser memory overhead reduced – smaller and faster
    • ArrayBuffer transfer* functions do not use species constructor (conformance). Note that this is a potential security vulnerability and consequently a recommended update to all production releases with these APIs enabled.
  • Examples
    • ECMA-419 OTA push using HTTP server
    • Two new examples using QMI8658 IMU (contributed by @stc1988)
    • New suite of Home Assistant examples
      • blink
      • blink-ts
      • button
      • discover
  • TypeScript
    • ECMA-419 HTTP Server typings added
    • ECMA-419 Wi-Fi typings added
    • ECMA-419 Update (OTA) typings added
    • ECMA-419 DNS-SD typings added
    • screen adds optional frameRate, syncFrame, and command()
    • FFI typings added
    • JSON modules now work with TypeScript (at least in some cases..)
    • Add typings/tsconfig.base.json for convenience running tsc outside mcconfig and mcrun. Useful for mcpack. See tsconfig.json of examples/packages/ts-hello for an example.
    • Add typings/mcpack.d.ts to repository for easier maintenance
  • Tests
    • ECMA-419 File tests added
    • ECMA-419 Wi-Fi tests added
  • Documentation
    • FFI documentation notes shared library support required by some examples
  • Tools
    • xsbug
      • Fix ancient bug that occasionally failed to send all data to debug target. Improves reliability, especially for test262 and testmc on-device testing.
    • mcpack
      • Automatically sets up WebSocket and localStorage globals if project uses them
      • External subplatform support (tracks mcconfig in Moddable SDK 8.1). Contributed by @HipsterBrown.
      • On build error, reminder that npm install may be needed
    • serial2xsbug no longer spins CPU at 100% after lost USB connection (macOS and Linux)
    • mcrun treats preload section as warning not error #1612 (Suggested by @stc1988)
    • xsdb – add "info instrument" to help (Contributed by @stc1988)
    • test262 works, better than ever, on Moddable Six again

Contact Us

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