Moddable SDK 7.1 contains improvements made between January 14, 2026 and February 11, 2026.
Our January release was a big one and a little later than usual. We're happy for the dust to settle in our February release. Still, there are two big items in this release.
ES2026 – the very latest JavaScript
The annual update to the official JavaScript language standard is expected in June, but our XS JavaScript engine already implements all the features expected to be part of that. XS passes 100% of the test262 tests for all new features, so you'll see consistent results running on a $1 microcontroller or in a web browser on a $1000 computer. For complete details, check out XS Conformance.
Here's a summary of the new features in ES2026 with notes on what they mean for Embedded JavaScript developers.
- Upsert – This curiously named proposal is a
MapandWeakMapoptimization. A common pattern is to usehasto check if an item exists, and then either add it withsetor retrieve it withget. The newinsertOrGet()method does all that in one step, eliminating code, function calls, and some internal calculations. The MDN documentation provides several examples. TheinsertOrGetComputed()variation is for when creating the default value is relatively expensive. If your Embedded JavaScript project makes heavy use ofMap(possible) orWeakMap(unlikely), give these new calls a look. They could save you some cycles. JSON.parse()source text access – The source text used to generate JSON values is now available to scripts through a new parameter to the reviver callback function. This can be used to provide higher precision thanJSON.parsesupports, for example to use BigInt values for large integer values.- Iterator Sequencing – This addition to the Iterator Helpers provides
Iterator.concat()to easily sequence two or more iterators as a single iterator. Uint8Arrayto/from Base64 – This adds Base64 and Hex conversion functions toUint8Array. Hex conversion is convenient for debugging Embedded JavaScript binary data –trace(Uint8Array.of(1, 2, 3, 4).toHex(), "\n");The Moddable SDK has supported this proposal for a couple years now, and all modules and examples have transitioned to use it.Math.sumPrecise()– When adding more than two floating-point values, a more precise result is obtained by a specialized algorithm. This can also avoid some unexpected results, as MDN explains. This capability is unlikely to be essential for embedded developers as most values don't require such high precision.Error.isError()– This new function tests whether an object is descended fromError. This is primarily useful with realms, which are not used by embedded developers.Array.fromAsync()– This convenience function creates a new array from an asynchronous iterable object. See MDN for details.
XS also implements Explicit Resource Management, a Stage 3 Proposal that improves resource management. This proposal is relevant for Embedded JavaScript developers working in resource-constrained environments. The feature is disabled in XS by default, but can be enabled by setting mxExplicitResourceManagement.
Embedded JavaScript developers know that one of the constrained resources they have to manage is the flash memory space that stores code – their code, the RTOS, and the Moddable SDK. There's a reasonable concern that these new language features will require space in flash memory, which will eventually cause it to overflow with unused features. Fortunately, the Moddable SDK has you covered. By default, Moddable SDK builds automatically strip unused features from the JavaScript engine. The code for those features is never installed on the device. Even ChatGPT understands this, although it gets some of the details wrong, so better to read our docs.
Over the last year, test262 has evolved to be even more precise. See XS Conformance for the latest test results in detail.
Zephyr Builds on Windows
You can now build Zephyr projects on Windows. The set-up is straightforward:
- Install Moddable SDK
- Install Zephyr SDK and tools
- Build your project using
mcconfigas normal
Step-by-step instructions are included in our updated Zephyr documentation.
Many Moddable SDK developers already have an ESP32 board (or three). You can use Zephyr on most ESP32 family boards – including Wi-Fi, BLE central, and displays. That's an easy way to start exploring. We've had good luck with boards from ST, such as the Nucleo F413ZH.
xs-dev for Zephyr
Many Embedded JavaScript developers use xs-dev to install and update the Moddable SDK and the embedded SDKs that it depends on. The most recent release of xs-dev adds support for Zephyr on macOS and Linux. Using xs-dev is the easiest way to install everything you need to work with the Moddable SDK. Thanks to Nick Hehr for the ongoing support!
Details
These notes do not include features described above.
- Modules
- chatAudioIO – Update default
queueLengthto prevent stalls with certain LLM engines. (Contributed by @stc1988)
- chatAudioIO – Update default
- XS JavaScript engine
- Optimize double to integer conversion for common values. Uses
ilogb()to bypass unnecessary double precision calculations while maintaining ECMA-262 conformance. - Fix obscure stack overflows in Array flatMap and sort functions. These caused operations to fail that should have succeeded.
- Fix signature of
fxBoolean()to be consistent everywhere. - Fix incorrect serialization in
escape()and enable optimization when no escaping occurs. #1562 (Reported by @ChALkeR) - Fix incorrect serialization of empty objects and empty strings with padding by
JSON.stringify(). #1564 (Reported by @ChALkeR)
- Optimize double to integer conversion for common values. Uses
- TypeScript
- Rename
BufferLiketoByteBufferto match ECMA-419 terminology. This is potentially a breaking change to existing TypeScript code.
- Rename
- Documentation
- Update Zephyr docs with flash, files, and key-value notes.
Contact Us
If you have questions or suggestions about anything here, please reach out:
- Start a new Discussion on our GitHub repository
- Drop by our Gitter to chat
- Contact us on X / Twitter at @moddabletech