Skip to content

Moddable SDK 4.3.0

Compare
Choose a tag to compare
@mkellner mkellner released this 06 Nov 20:36
· 407 commits to public since this release

This release contains improvements to the Moddable SDK made between October 2, 2023 and November 5, 2023.

This release contains many enhancements for mods, one of the most unique and popular features of the Moddable SDK. Highlights of this release include:

  • The XS performance profiler now works with mods, so you can profile all the JavaScript code in your project (including the examples in our book.
  • Arrow functions are incredibly popular with JavaScript developers for their compact syntax. They are so popular that developers often use them when their primary feature -- automatically binding to this -- isn't needed. We've reduced the memory use arrow functions that don't access this so embedded JavaScript developers can use them with the smallest possible overhead.
  • ESP-IDF v5 support has deepened with improvements to several more modules since rolling out last month in Moddable SDK 4.2. Thank you to the developers who reported issues and helped with fixes.

News

  • Save the date! 🎉Ecma TC53 is holding a workshop to discuss proposals and consider options for Embedded JavaScript standardization including new APIs, interoperability, packaging, and Hardened JavaScript. 🎉
    • 📆December 6
    • 📍Apple Park
    • 🧑🏽‍💻Everyone with relevant expertise welcome
  • The Node-RED MCU Plug-in by @ralphwetzel is live. It has some great new features include:
    • Support for Node-RED v3.1.0
    • Support for Moddable Four and other nRF52 powered devices

November Community Update

The monthly Moddable Community Call is now a monthly Moddable Community Update! We'll share more about this soon. Sign up to receive an email notification when new community updates are published.

Release Details

  • Modules
    • Servo driver fix for ESP-IDF v5. Contributed by @meganetaaan.
    • ESP32 audio out no longer uses deprecated is2_write_expand, configuring the IDF driver to do the expansion instead. Reported by @meganetaaan. #1227
    • Improve PSRAM support ESP32 family devices with sdkconfig updates to consistently set CONFIG_SPIRAM_USE_MALLOC
    • ILI9341 (MIPI) display drivers
      • command() API supports all byte buffers now, not just ArrayBuffer
      • Experimental ESP32 ILI9341 parallel display driver updated to work with ESP-IDF v5.
    • SSD1306 driver builds in all cases again (change to destructor failed in some cases). Reported by @stc1988 and @PLCMercenary. #1239
    • ECMA-419
      • Restore serial driver bypass on ESP32. Reported by @meganetaaan. #1226
      • Moddable Four host provider instance now includes PulseCount, SPI, and LIS3DH sensor driver.
    • Raspberry Pi Pico
      • Neopixel driver uses ws2812.pio from Pico SDK for easier maintenance
      • Raspberry Pi Pico build now uses PICO_SDK_DIR instead of PICO_SDK_PATH. Contributed by @stc1988.
    • Outline rendering fix for ESP32-S3. Cannot use program memory (IRAM) for rendering buffer (works on ESP32). Reported by @meganetaaan who also helped isolate the problem. #1239
  • XS JavaScript engine
    • Reduce memory use by arrow functions that do not use this. This optimizes a common pattern of JavaScript developers: use of arrow functions when the this binding is not needed.
    • Array destructuring now correctly caches the iterator's next. Reported by @gibson042 #1223
    • Regular Expression maximum qualifier was not always applied correctly. Reported by @Jinyn01. #1238
    • RegExp.prototype.source now only escapes \ if necessary, consistent with web engines. Issue found when testing fix for #1238.
    • Fix bug in linker when building mods that caused symbols to be omitted. Many thanks to @stc1988 for reporting this obscure bug. #1232
    • Debugging support no longer triggers a spurious breakpoint when inspecting a property implemented by a getter.
    • Fixes for issues identified by fuzz testing with Fuzzilli and oss-fuzz. Thank you to @Agoric for their ongoing assistance with this work.
      • Fix use of uninitialized variable in rarely used path in module loader
      • String.prototype.replace and String.prototype.replaceAll changed to eliminate uninitialized variable warning from UBSan (the uninitialized value was never used)
      • dtoa (widely used library to convert floating point numbers to strings) updated to eliminate use of an uninitialized variable. There is no evidence this bug ever caused a conformance issue or created a vulnerability in XS. Many thanks to David M. Gay for the patch.
      • In certain memory configurations, passing a search string to String.prototype.replace or String.prototype.replaceAll that was longer than the string to be searched read from unintended memory which could crash if that memory was unmapped.
  • TypeScript
    • Fixes to wifi and pins/digital type declarations
  • Examples
  • Documentation
    • ESP32 documentation now lists all supported members of the ESP32 family
    • Fix link to BLE Remotes blog post in BLE HID peripheral example. Contributed by @stc1988.
    • Mods documentation describes the current archive format used for mods, as well as a basic introduction to the Atom/Box file structure archives use.
    • Linux portion of Getting Started document updated based on developer feedback
  • Tools
    • mcrun (build tool for mods)
      • Suppress output of default check module when pixel format is set to x (unknown -- typically used for projects without a display)
      • Suppress output of empty config module when no configuration properties are defined for the mod
      • For nRF52, adds support for serial connected devices
      • For ESP32, now discovers serial ports consistently with mcconfig
    • XS Profiler now supports profiling mods. This required assigning profile IDs to functions in mods during of remapping process.
    • mcconfig reports an error if it detects it is building a mod, and recommends use of mcrun instead. Inspired by report from @kallistisoft.
    • xs linker (xsl) now preloads modules prefixed with lockdown/ last when preloading. This allows modules to perform operations to prepare the environment immediately before lockdown, after all ordinary preloaded modules have run.
    • xs test tool (xst) makes lockdown() and harden() available when running test262 harness to support more Hardened JavaScript tests

Contact Us

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