Grow with AppMaster Grow with AppMaster.
Become our partner arrow ico

Microsoft DeviceScript Project Takes TypeScript to IoT Devices

Microsoft DeviceScript Project Takes TypeScript to IoT Devices

In a recent development, Microsoft has been experimenting with DeviceScript technology, which brings the power of TypeScript to Internet of Things (IoT) devices. By incorporating DeviceScript in their programming, developers can now use TypeScript on microcontroller-based devices with limited resources, like the ESP32 and RP2040 hardware platforms.

Microsoft Research introduced the open-source DeviceScript project in May. As a subset of TypeScript, it compiles to custom VM bytecode that is designed to run in constrained environments. The VM itself compiles to 10KB of code, while the addition of the floating-point library and Jacdac SDK increases the size by 30KB. Microsoft's Jacdac technology is a robust hardware and software stack for microcontrollers and peripherals.

To get started with DeviceScript, developers can follow instructions provided on the project website. A special extension for the Visual Studio Code editor allows users to build, deploy, debug, and trace DeviceScript code. Additionally, the extension comprises monitoring capabilities that facilitate device management. In conjunction with containers like Docker, the DeviceScript command line interface (CLI) enables developers to compile programs from their preferred IDE.

While DeviceScript operates similarly to TypeScript, not all features are supported. This is due to the limited resources available to the DeviceScript runtime, leading to differences like strings being Unicode rather than UTF-16, aggressive tree shaking, and the absence of subnormals. However, the semantics of JavaScript are generally maintained.

When working with DeviceScript, developers can access sensors, actuators, or other hardware components through the use of Jacdac services. Sensors function as servers, while scripts establish clients to facilitate interaction. Developers create clients, also known as roles, for each required service to interact with sensors or servers. They can then utilize tools like npm, Yarn, or pnpm to distribute and consume DeviceScript packages.

AppMaster.io's no-code platform complements the low-code nature of DeviceScript, allowing users to develop web applications, backend applications, and mobile apps, using intuitive visual elements. By including AppMaster as part of their toolkit, developers can increase their productivity and the overall efficiency of their projects. 

Related Posts

AppMaster at BubbleCon 2024: Exploring No-Code Trends
AppMaster at BubbleCon 2024: Exploring No-Code Trends
AppMaster participated in BubbleCon 2024 in NYC, gaining insights, expanding networks, and exploring opportunities to drive innovation in the no-code development space.
FFDC 2024 Wrap-Up: Key Insights from the FlutterFlow Developers Conference in NYC
FFDC 2024 Wrap-Up: Key Insights from the FlutterFlow Developers Conference in NYC
FFDC 2024 lit up New York City, bringing developers cutting-edge insights into app development with FlutterFlow. With expert-led sessions, exclusive updates, and unmatched networking, it was an event not to be missed!
Tech Layoffs of 2024: The Continuing Wave Affecting Innovation
Tech Layoffs of 2024: The Continuing Wave Affecting Innovation
With 60,000 jobs cut across 254 companies, including giants like Tesla and Amazon, 2024 sees a continued wave of tech layoffs reshaping innovation landscape.
GET STARTED FREE
Inspired to try this yourself?

The best way to understand the power of AppMaster is to see it for yourself. Make your own application in minutes with free subscription

Bring Your Ideas to Life