First step to 'Windows API', 'Win32 Metadata' project in progress


Microsoft is working on the Win32 Metadata project. The idea is to create metadata for APIs so that more languages ​​can access Windows APIs easily, and the first beneficiaries are expected to be languages ​​such as Rust, C#, and C++.

The Win32 Metadata Project is on GitHub. The goal is to provide a complete comment on WinAPI. By using this, it can be expressed in any language in an automated manner, improving coding accuracy and minimizing the maintenance burden. The outcome of this project is an ECMA 335 Windows metadata file, published through Nuget.org. However, since it takes a considerable amount of time to accurately describe all Windows APIs, there is also a demand to create a development tool to support this project.

One of these projects is C#/Win32. Analyze metadata and create P/Invoke wrappers required for API calls. C#/Win32 is one of the initial achievements that can be achieved with the dynamic projection of the Win32 API, and it supports the IntelliSense function and strong types for variables. The same goes for Rust for Windows. Rust language projection allows Rust developers to call all Windows APIs using on-the-fly generated code via metadata. Modern C++ projection is also being developed, and the Win32 metadata development plan includes C# and C++. The Rust project is scheduled to be officially released in 2022 after a preview process this year.

Microsoft will work with the community to support other languages ​​as needed by developers. For this project, development principles and goals, including the maximum range of API applications, are presented. According to Microsoft, the Win32 API already has access to C and C++, but other languages ​​such as C# and Rust require a wrapper or separate binding. In the meantime, developers had to create and process such wrappers or bindings themselves, but this process itself was cumbersome and there was a high possibility of errors.

There have been projects such as Pinbock for .NET and WinAPI-rs for Rust that support idiom expressions and river types of such bindings and wrappers, but it is expensive and technically difficult to support a broad and consistent API. did. Microsoft expects the Win32 Metadata Project to provide broad and stable API support across multiple languages.

Post a Comment

0 Comments