The Moddable SDK is an open source combination of development tools and runtime software to create applications for microcontrollers.
Microcontrollers are highly constrained devices compared to modern computers and mobile devices. A typical microcontroller used with the Moddable SDK has about 45 KB of free memory, 1 MB of Flash ROM, and runs at 80 MHz. The Moddable SDK uses many different techniques, both at build time and at run time, to work efficiently on these devices.
The primary programming language for development is JavaScript. The XS JavaScript engine at the center of the Moddable SDK implements the 2021 JavaScript language standard with better than 99% conformance.[1] The constraints of the target microcontroller may limit the number of language features that can be used in combination by a single application.
The JavaScript language implemented in the Moddable SDK is the same language used in web pages and Node.js. The microcontroller that the scripts run on, however, is very different from a personal computer, server, or mobile device. These differences often require a different approach to using JavaScript. The APIs and objects in the Moddable SDK are quite different, being designed with the goal of minimizing memory use. Bring your existing experience with JavaScript, but be prepared to think about performance, code size, and memory use in a different way.[2]
As much as practical, the Moddable SDK is implemented in JavaScript. Portions of the Moddable SDK are implemented in C for performance or direct access to native APIs.[3] There is no C++.
A significant part of building efficient software for microcontrollers occurs at build time. The Moddable SDK contains many tools and options for the build process.[4] Take time to learn about these to get the best results.
[1] See also: XS Conformance
[2] See also: XS Differences
[3] See also: XS in C
[4] See also: Tools
Content covering Moddable SDK here...
SDK License