Microsoft is making Win32 APIs more accessible to more languages including C# and Rust

Microsoft Windows Win32 APIs

The Win32 API is the native platform for classic Windows desktop apps. It is suitable for apps that require direct access to system features and hardware. These Win32 APIs are readily accessible to C and C++ developers. However other languages like C# and Rust require wrappers or bindings to access these APIs. To make Win32 APIs more accessible to more languages including C# and Rust, Microsoft today announced the new win32metadata project.

The aim of the new win32metadata project is to offer a complete description of the Win32 API surface in metadata so that it can be projected to any language in an automated way, improving correctness and minimizing maintenance overhead.

With this project, you will get Windows metadata file (winmd) published to Nuget.org containing metadata describing the entire Win32 API surface. Language projections need to be built on top of these metadata to enable developers to call Win32 APIs idiomatically from the language of their choice. Microsoft today announced three language projections.

  • Built in partnership with Andrew Arnott, the owner of the PInvoke project for .NET, C#/Win32 parses the metadata and generates the P/Invoke wrappers required to call the APIs you care about.
  • The Rust language projection follows in the tradition established by C++/WinRT of building language projections for Windows using standard languages and compilers, providing a natural and idiomatic way for Rust developers to call Windows APIs.
  •  Modern C++ projection

Source: Microsoft

Some links in the article may not be viewable as you are using an AdBlocker. Please add us to your whitelist to enable the website to function properly.

Related
Comments