Skip to content

Moddable SDK 8.3.0

Latest

Choose a tag to compare

@mkellner mkellner released this 03 Jul 23:21

Moddable SDK 8.3 contains improvements made between June 3, 2026, and July 3, 2026.

This release of the Moddable SDK includes contributions from many developers building with Embedded JavaScript in extremely diverse ways. Thank you to everyone for sharing your experience, expertise, and time with the community.

ECMA-419 Fourth Edition is an International Standard!

The Ecma General Assembly of June 2026 officially declared ECMA-419 Fourth Edition as an international standard. The Moddable team has been deeply involved in the creation of this standard, collaborating with many other organizations and individuals, in Ecma TC53.

You can read the complete standard here. Even if you aren't the kind of person who regularly reads standards, it is worth a look to appreciate just the breadth and depth of APIs that are available to Embedded JavaScript developers.

ECMA-419 Fourth Edition is significant for several reasons:

  • Standard Bluetooth LE JavaScript APIs for both central and peripheral (client and server) with broad functionality, significantly more capabilities than Web Bluetooth. Products can implement their Bluetooth support using JavaScript using a tiny fraction of the code required to do the same in C.
  • Standard DNS-SD in JavaScript allows products to claim local names, advertise their network services, and discover compatible network services.
  • Numerous refinements to make Embedded JavaScript developers even more powerful.
  • The standard itself has been fully reworked in Ecmarkup, just like the JavaScript standard, ECMA-262. This makes the standard easier to navigate with integrated search, smart highlighting, hierarchical table of contents, cleaner formatting, pinning, and faster loading.
  • TC53 is picking up the pace. Each previous edition required two years to prepare; the fourth edition took just one. We are optimistic that the adoption of Ecmarkup will allow the committee to maintain this shorter cadence.

All the new features in ECMA-419 Fourth Edition are already implemented in the Moddable SDK. You can start using them today.

Explicit Resource Management Lands

The Explicit Resource Management APIs are a set of new tools for ensuring that objects release their resources immediately when they are no longer needed. This capability is especially relevant to Embedded JavaScript developers because we typically work on resource-constrained devices.

The JavaScript language committee, TC39, recently advanced the Explicit Resource Management proposal to Stage 4, which means it will be incorporated into the language standard. Moddable implemented the features and has been testing them behind a flag. In this release, they are now enabled by default and available for everyone to use. The V8 team published a nice introduction. These features are also available in TypeScript.

The simplest way to use Explicit Resource Management is with the using keyword. Choose it in place of let or const for a disposable object so the instance is automatically disposed when it goes out of scope. In this example, there's no call to close() the file because that is taken care of automatically, even when the read() method throws an exception.

function loadFile(path) {
	using file = device.file.openFile({path});
	return file.read(file.status().size);
}

Without Explicit Resource Management, the function is much more complex:

function loadFile(path) {
	const file = device.file.openFile({path});
	try {
		const result = file.read(file.status().size);
		file.close();
		return result;
	}
	catch (e) {
		file.close();
		throw e;
	}
}

All ECMA-419 classes in the Moddable SDK can be used with Explicit Resource Manager, as they alias the ECMA-419 Base Class Patterns close() method to Explicit Resource Management's [Symbol.dispose]() method.

ESP-IDF Update Pending

ESP-IDF 6.0.2 is live. It fixes one known issue with BLE that Moddable SDK developers have encounterered. We've successfully tested it with the Moddable SDK and plan to migrate to it in our next Moddable SDK release.

Details

  • ECMA-419
    • All ECMA-419 classes support Explicit Resource Management by aliasing [Symbol.dispose] to close().
    • crypt/digest implementations for PSA (ESP32, eventually Zephyr) and KCL (any target). Note that this API is not yet stable.
    • UDP on macOS includes error codes in exceptions.
    • Serial on macOS issues writable before readable.
    • Asynchronous I2C
      • close() fix #1620 (reported by @stc1988).
      • writeRead() implemented.
    • BLE Peripheral implements remoteAddress property and disconnect() method (suggested by @stc1988). These are 5th Edition features.
  • Devices
    • Pebble / Alloy
    • Moddable Display 6 build fixes
    • ESP32, Pebble, and Pico set context correctly for touch
    • ESP32, ESP8266, Pico, and Zephyr continue start-up after attempt to connect to Wi-Fi fails #1644 (reported by @stc1988)
    • Windows now uses TimerQueue for Timer module to support longer timeouts and more timers #1638 (requested by @amao-cbw)
    • ESP32
      • More mod support for M5 devices (contributed by @stc1988)
      • M5Stack Core2 updates to use ECMA-419 touch, power peripheral, and RTC #1624 (contributed by @stc1988)
  • XS JavaScript engine
    • Enable Explicit Resource Management on all targets.
      • Conformance improvements for Explicit Resource Management.
    • xsmcGet(), xsmcGetIndex(), xsmcGetAt() return boolean indicating whether property was found. Streamlines a common pattern in ECMA-419 constructors
    • Native stack overflow no longer reported as JavaScript stack overflow.
    • String trim*() methods only copy if something is trimmed.
    • Array.from() and Array.fromAsync() don't throw on an undefined mapper argument #1645 (reported by @d01c2).
    • Conformance improvements for immutable ArrayBuffer proposal (reported by @erights, thanks to @gibson402).
    • Fix for await in module body (top level).
  • Modules
    • EventSource web-compatibility improvements
    • CO5300 Display Driver
      • 180-degree rotation optimization #1623 (contributed by @kitazaki)
      • Allow some async transmission of pixels in 90/270 rotation cases
    • Add GDEY037T03 ePaper display driver #1636 (contributed by @jplexer)
    • Modules module supports namespace import
    • Commodetto
      • Large glyphs render correctly after fixing overflow in font engine #1631 (reported by @FeralFox)
      • When dividing buffer for async transmission, ensure buffer height remains mulitple of two (fixes garbage in CO5300 driver which requires height to be a multiple of two)
      • Reject unsupported PNG files to avoid unexpected state #1639 (contributed by @rootvector2)
      • BMF parsers updated to defend against invalid data #1643 (contributed by @rootvector2)
    • zlib inflate's push() method accepts optional output buffer to let the caller manage output buffers and output size
    • ChatAudioIO uses a larger native stack for the chat worker (default no longer enough in ESP-IDF v6) (reported by @stc1988) #1635
    • Base64 module (deprecated) memory safety vulnerability fixed #1627 (contributed by @alhudz)
    • DNS parser hardened with additional bounds checks #1628 (contributed by @rootvector2)
    • TextDecoder hardened against invalid data #1637 (contributed by @rootvector2)
    • GT911 touch driver
      • Use writeRead() to minimize I2C transactions
      • Implement length configuration to indicate the maximum number of simultaneous touch points
      • Add asynchronous version of driver using Async I2C
      • Add asynchronous version of driver using micro worker
    • FT6206 touch driver correctly merges configure() options #1646 (contributed by @stc1988)
  • TypeScript
    • Typings now support multiple versions of TypeScript compiler
    • WebSocket typings collision fixed #1629 (reported by @imax9000)
    • Typings updated to sync with API changes in this release
  • Tools
    • mcpack automatically creates EventSource global if used by packages.
    • testmc now uses ECMA-419 Wi-Fi.
    • xst supports d8 bundle format to enable module fuzzing with Fuzzilli.
  • Examples
    • Home Assistant examples show clearer error messages when authorization fails (e.g. token isn't configured).
    • New package/eventsource example (in TypeScript).
    • New bmi270 examples #1640 (contributed by @stc1988).

Contact Us

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