Microsoft proposes Static TypeScript for embedded systems Credit: Mira DeShazerCreative Commons
Business Management

Microsoft proposes Static TypeScript for embedded systems

Microsoft is proposing a subset of TypeScript, the company’s popular typed superset of JavaScript, and its compiler/linker toolchain for use in embedded computing. 

In a paper titled, “Static TypeScript: An Implementation of a Static Compiler for the TypeScript Language,” Microsoft researchers describe a Static TypeScript system and the challenges of implementing embedded programming platforms in the classroom. Static TypeScript is considered useful for educational purposes while amenable to static compilation for small devices.

With Static TypeScript, a program is compiled to machine code in the browser and linked against a precompiled C++ runtime to produce an executable that is more efficient than the prevalent embedded interpreter approach. Battery life is extended and devices with as little as 16KB of RAM can be supported. An alternative to embedded interpreters, Static TypeScript is the core language supported by the MakeCode Framework used to build applications for microcontroller devices.

Features of Static TypeScript include:

  • Use of nominal typing for statically declared classes and support for efficient compilation of classes via classic techniques for v-tables.
  • A toolchain that runs offline, once loaded into a browser, with no need for a C/C++ compiler. The toolchain compiles Static TypeScript to ARM Thumb machine code, for linkage against the C++ runtime in the browser.
  • Generation of compact machine code, suitable for application domains such as game programming for low-resource devices.
  • No need for app or device driver installation when deploying Static TypeScript user programs to embedded devices. Access to a browser is all that is necessary. Compiled programs appear as downloads, to be transferred manually to a device.
  • The Static TypeScript runtime uses a mark-and-sweep garbage collector.

Researchers do not intend to expand Static TypeScript to support all of TypeScript. Only features useful in the embedded context would be added, based on user feedback.

PREVIOUS ARTICLE

« Five cool Android 10 features that haven't yet arrived

NEXT ARTICLE

Microsoft did it: Windows 10 now powers over half of the world's PCs »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Poll

Do you think your smartphone is making you a workaholic?