Skip to content

Moddable SDK 9.0.0

Latest

Choose a tag to compare

@mkellner mkellner released this 05 Aug 19:54

Moddable SDK 9.0 contains improvements made between July 3, 2026 and August 4, 2026.

Moddable SDK 9.0 is a huge release with features that have been in the works for a long time. Its powerful new capabilities empower Embedded JavaScript developers to do more, more easily, in more familiar ways, with less code. Our new documentation suite guides developers (and their LLMs) to make the best use of the capabilities the Moddable SDK provides.

This release also contains several conformance improvements and patches a few security vulnerabilities. Many thanks to the individuals who contributed their expertise and time to ensure the robustness of the Moddable SDK for all Embedded JavaScript developers.

Streams – Squeezing One More Web Foundation into Embedded Devices

Streams are a foundation feature of modern Web APIs. Until now, they haven't been available to Embedded JavaScript developers. Moddable has created a completely new implementation of the Web platform's Streams API tightly optimized for use with our XS JavaScript engine. It delivers excellent compatibility with Streams in web browsers, with a relatively light code size and memory footprint.

The Streams API is a powerful tool to build data flows by connecting together different kinds of streams. The Streams API takes care of moving data through the flows with mechanisms for managing buffering to keep memory use under control. The Moddable SDK supports advanced features of the Streams API, including pipes, transforms, tees, and bring-your-own-buffer. Streams are built around promises, so they are fully asynchronous.

By themselves, the core Streams API classes are powerful. But the Web platform uses them as a building block for many high-level Web APIs. Several of those have also landed in the Moddable SDK.

  • fetch() uses streams to stream request bodies and response bodies. Internally, fetch() uses DecompressionStream to transparently decompress compressed HTTP responses.
  • Web Serial uses a readable and writable stream to access ECMA-419 Serial ports
  • WebSocketStream uses a readable and write stream to access WebSocket messages.

In addition, Streams can be used with ECMA-419 Embedded IO to move data around and apply transforms. The Moddable SDK contains examples that show streams attaching a button to an LED and using WebSocketStreams to transmit touch sensor samples from one embedded device to another.

We're very excited about the ability of streams to further simplify Embedded JavaScript development by providing another bridge between the modern Web platform and Embedded JavaScript.

Guides – A New Kind of Docs for Developers and their LLMs

Documentation is one of the most contentious topics in software development. Our new Guides are a new kind of documentation. They take a code-first approach to explaining the Moddable SDK. They are an extensive collection of small code snippets paired with brief text explanations. They show how to perform common tasks simply. Guides provide a path through essential APIs to get developers started quickly. They complement reference documentation and standards.

In many cases, there are two (or three!) different APIs available to perform the same task such as making an HTTP request. The guides describe all of them and give guidance on choosing the right one for your project.

The Guides are also designed to be friendly for LLMs. The consist of small chunks of knowledge that combine code written using best practices along with concise, relevant details. We've had great results pointing various coding agents at the guides to aid them in reviewing and writing Embedded JavaScript code for the Moddable SDK.

Each Guide, like HTTP, Optimizing, and Time, begins with an Overview page that links to all its articles. The overview brings together essential knowledge including build instructions for developers using mcconfig or mcpack, along with links to reference documentation, TypeScript declarations, examples, implementations, and relevant standards – everything you and your LLM need to fully understand the topic.

There are nearly 150 (!!) articles in this first release of the Guides. There's more to do. We'd love to hear from you about what's there now, and what you'd like to see next.

Captive Portal

One of the greatest headaches for an Embedded Developer is providing a way for users to configure the Wi-Fi on an embedded product. We've added a Captive Portal module that manages this process from start to finish. It creates a Wi-Fi Access Point that the user can connect to from their phone without the need to install a mobile app. This module weaves together many different modules built around ECMA-419, including Wi-Fi Access Point, Wi-Fi client, HTTP server, WebSocket server, and a DNS Server.

We look forward to hearing from developers about how they've used the new Captive Portal in their projects, and their ideas for how the API can be extended to cover additional scenarios.

Stack-chan 1.0

Stack-chan has been one of our favorite open source communities since it won the Hackaday Prize silver medal in 2021. Since then, the community has grown continuously, but the vision of a friendly desktop robot that anyone can easily make their own using standard JavaScript has never wavered. The project has pushed the Moddable SDK forward through its innovative use of embedded technologies with the goal of always making a better experience for users and developers. They recently used the WASM support in the Moddable SDK to build a Stack-chan web simulator – a huge achievement.

Along the way, the official Stack-chan firmware reached version 1.0. Check out the latest on the official Stack-chan GitHub repository. Congratulations to @meganetaaan, @stc1988, and the many other contributors to Stack-chan!

ESP-IDF v6.0.2

We've upgraded to the latest ESP-IDF v6.0.2 from Espressif. This is an incremental update, as we are already on ESP-IDF v6.0. Among many improvements, ESP-IDF v6.0.2 fixes a bug with BLE peripheral names that impacted developers using the Moddable SDK.

Instructions for updating are in our documentation. If you forget to update, the build will remind you.

TypeScript 7

We've confirmed that the Moddable SDK is compatible with TypeScript 7. By all reports, TypeScript 7 is significantly faster than previous versions. We recommend migrating to TypeScript 7 as soon as practical. Building with TypeScript 6 still works. Congratulations to the TypeScript team on this major achievement.

Details

  • Modules
  • ECMA-419
    • All new Wi-Fi Access Point module for ESP32, ESP8266, Pico, and Zephyr. This is an experimental implementation of a proposed ECMA-419 5th Edition feature. For details, see the example.
    • All new ECMA-419 Bosch BME280 sensor (temperature, humidity, pressure) and example.
    • Experimental option to instantiate BLE Client from BLE Server to share connection handle for efficient full-duplex communication
    • BLE Server handles dropped connections and various pairing modes more reliably
    • AudioOut for ESP32 throws on set-up errors in all paths now
    • Custom HTTP headers option in HTTP Server's static WebPage route
    • WebSocket Client fixed when there are unread bytes and additional bytes are received
    • HTTP Client fixes to reliably send chunked-encoding trailer for chunked request body
    • TCP socket (lwip) fixes race conditions (contributed by @xymeow) #1656
    • MQTT Client onControl() arguments conformance fix. This is a breaking change if you implement onControl().
    • TLS Socket
      • Conformance fixes, including renaming secure to tls. This is a breaking change if you create the TLS options object directly (most projects use the defaults through the device global and so are unimpacted)
      • On close(), attempts to send a TLS close to the server for a clean session termination
    • DNS-SD discovery implements onLost() callback
  • Devices
    • Added devices
      • Waveshare RP2350 Touch LCD 2.0 – pico/ws_rp2350_touch_2
      • Waveshare RP2350 Touch LCD 3.5 – pico/ws_rp2350_touch_3_5
      • Waveshare ESP32-S3 LCD 1.47 – esp32/ws_esp32s3_1_47
      • Waveshare ESP32-C5 LCD 1.47 – esp32/ws_esp32c5_1_47
      • Waveshare ESP32-C6 LCD 1.47 – esp32/ws_esp32c6_1_47
      • ESP32-2424S012C – esp32/c3_touch_1_28 (contributed by @stc1988) #1658
    • ESP32
      • Devices with both UART and CDC (mostly ESP32-S3) don't claim UART pins unless xsbug detected. Avoids conflicts on boards that use UART pins for other purposes.
      • Fix build flags for ESP32-C6 and ESP32-H2 silicon
      • Initial support for ESP32-C5 and start of ESP32-P4 support
    • Pico
      • RP2350 devices can use GPIOs beyond 32
    • All new FT6336 ECMA-419 touch sensor driver
    • Linux
  • TypeScript
    • Add typings for nearly all new modules, including Streams
    • Fixes to Piu typings (contributed by @meganetaaan) #1651
    • Add esnext.disposable to tsconfigs to support Explicit Resource Management. (contributed by @stc1988) #1649
    • Add typings for piu/ImageBuffer
  • Tools
    • mcpack
      • Changes to many manifests to allow them to be auto-included by mcpack
      • Autoglobals support nested globals (e.g. navigator.serial and device.network.http).
    • xsdb (CLI JavaScript debugger)
      • Option to display timestamps on log lines
    • AGENTS.md added with notes to address common LLM mistakes. CLAUDE.md links to AGENTS.md.
  • XS JavaScript engine
    • Fix crash when defining private property on module namespace object (found with Fuzzilli)
    • Add bounds check to TypedArray fill() and set() methods, and correct spec step in copyWithin(). (reported by @cristianstaicu)
    • Consistent prototypes for fxGet() (contributed by @meganetaaan) #1652

Contact Us

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