News for hackers. Stuff that matters.

phoddie

FWIW - we usually don't parse scripts on the MCU because that takes time and memory. Instead, we compile on the development machine using xsc and link using xsl. This leaves more memory free for scripts to use for data, and allows scripts to start running almost instantly.
Instructions for building XS for ESP32 are in our GitHub repository. There are separate sections for building on macOS, Windows, and Linux. https://github.com/Moddable-OpenSource/moddable/blob/public/...
We don't have a document that answers your question directly but the capabilities are all there. We're happy to help you get started - post an issue on our repository on GitHub. The "XS in C" describes the API you'll use from your C/C++ code to interact with XS (created a VM, implement native functions callable from JavaScript, etc). Most of the limits can be set using the manifest, which defines the virtual machine build. For example, to limit the memory used by a script or the modules available to a script (e.g. what classes and functions it can call), use the manifest's "creation" object which indicates the maximum number of bytes the VM can allocate. Here's the base manifest all our examples include, which define the VM size in the creation as 32 KB - https://github.com/Moddable-OpenSource/moddable/blob/public/.... The manifest also lists all the modules that are built into the virtual machine. These are the only modules a script can use (unless you add a module that can load other modules!). For example, manifest_net.json (https://github.com/Moddable-OpenSource/moddable/blob/public/...) includes a bunch of modules related to networking (socket, sntp, wifi).
Any NodeMCU compatible ESP8266 board should work. Moddable Zero starts with a NodeMCU board and adds a color touch screen for $20 (and they are handmade to order in California). http://www.moddable.com/moddable-zero.php
Better than that, XS today achieves over 99% compatibility on test262, the official JavaScript language test suite, for ECMAScript 2017 (the latest versin of the JavaScript language). That's over 50,000 tests. Details on the test results in our GitHub repository @ https://github.com/Moddable-OpenSource/moddable/blob/public/...