Skip to content
theregister·

💻Microsoft Unveils WinRT API Projections for Node.js

JavaScript now has deep Windows access without native add-ons

TL;DR

Microsoft introduces dynamic projections for JavaScript, allowing direct access to Windows Runtime APIs via Node.js. This means no more manual translations or native add-ons for integrating Windows features into JS apps.

Microsoft just dropped support for JavaScript developers to tap directly into the Windows Runtime API (WinRT) with a public preview of its new dynamic projections feature. Now, through Node.js and Electron environments, devs can write hooks to data-oriented WinRT APIs without needing native add-ons or manual translations. This is huge for anyone building cross-platform desktop apps in JS/TS, as it simplifies integration with Windows features like networking, sensors, globalization, security, and even AI capabilities. The dynwinrt package generates JavaScript wrappers and TypeScript declarations at build time, making setup a breeze.

Microsoft Unveils WinRT API Projections for Node.js — theregister

Key Points

1

Node.js developers can now use the dynwinrt package to generate JavaScript wrappers and TypeScript declarations for Windows features, streamlining integration with WinRT APIs.

2

The new winappCli tool includes a command-line interface (CLI) setup, configuration options, and sample code for getting started with dynamic projections in Node.js or Electron environments.

3

Windows Runtime API metadata relies on Windows Metadata (winmd), introduced in Windows 8, enabling automatic updates to wrapper or declaration code when API changes occur.

4

JavaScript/TypeScript apps can now leverage most of Windows' capabilities through the WinRT API projection, excluding UI functionalities like window management and user interface elements.

5

Microsoft's new dynamic projections feature supports a wide range of system and device calls, including networking, sensors, globalization, security, and AI services such as text generation and image recognition.

Why It Matters

If you're building cross-platform desktop apps with JavaScript or TypeScript in a Node.js environment, this is a game-changer. No more manual translations or native add-ons required to integrate Windows features into your applications. The dynwinrt package simplifies setup by generating necessary wrappers and declarations at build time.

windowsnodejselectronapi-projectionscross-platform

Frequently Asked Questions

Why does this matter?

If you're building cross-platform desktop apps with JavaScript or TypeScript in a Node.js environment, this is a game-changer. No more manual translations or native add-ons required to integrate Windows features into your applications. The dynwinrt package simplifies setup by generating necessary wrappers and declarations at build time.

What happened?

Microsoft introduces dynamic projections for JavaScript, allowing direct access to Windows Runtime APIs via Node.js. This means no more manual translations or native add-ons for integrating Windows features into JS apps.

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 2,359 builders reading daily.