Significant updates to Moddable SDK
The most recent push to the Moddable repository on GitHub is a big one. It includes the following:
- Workers for microcontrollers -- A lightweight implementation of Web Workers for microcontrollers. It supports both pre-emptive schedulers (ESP32) and cooperative schedulers (ESP8266). Considered experimental, but worth giving a try. Check out the docs and example.
- Object Rest/Spread properties -- XS now supports the Stage 3 proposal widely used in React Native to provide rest properties for object destructuring assignment and spread properties for object literals. The feature is near zero-overhead for projects that do not use the feature, as it is automatically stripped at build time.
- ESP32 build for Linux -- Build ESP32 projects on Linux now too. Build instructions in the Getting Started docs.
- Compatible with more JPEG images -- Commodetto's JPEG reader now supports JPEG images subsampled with H2V2, allowing display of many more JPEG images. A new example app by Will Dimmit shows how to download and display JPEG images from the web using async functions.
- test262 conformance improved -- We've run XS against the latest test262 suite and fixed several conformance issues it identified. Details are in the XS Conformance document.
- Better debugging -- Serial debugging connections now support multiple virtual machines for debugging Workers on microcontrollers. Baud rate speed for ESP32 debugging increased 8x, from 115200 to 921600, for faster debugging. There's new a new video showing how to use xsbug and docs too.
- Secure password entry -- The soft keyboard example has a new option to obscure text as it is typed, so the entered password is never fully visible on-screen.
- I2C -- The I2C implementation for ESP32 supports multiple devices with different configurations.