Microsoft has officially released its Rust/WinRT project on GitHub. Now in public preview, it should be a gigantic aid for those who know the language and want to create anything from Store and desktop apps to device drivers.
“Rust/WinRT follows in the tradition established by C++/WinRT of building language projections for the Windows Runtime using standard languages and compilers, providing a natural and idiomatic way for Rust developers to call Windows APIs,” said Windows developer platform principal software engineer Kenny Kerr in a blog post. “Rust/WinRT lets you call any WinRT API past, present, and future using code generated on the fly directly from the metadata describing the API and right into your Rust package where you can call them as if they were just another Rust module.”
In many ways, it’s an indicator that Microsoft is starting to move away from its traditional model of a primarily C++ driven OS. It previously used Rust to re-write low-level components and it also uses the language for cloud tools. Additional languages mean an open door to more devs, and Kerr notes that it could prove more secure for those not carefully following conventions.
While Rust is similar to C++, Kerr believes it has the potential to “solve some of the most vexing issues that plague C++ projects”. This is partly due to its design, which focuses on memory safety as a core principle. The version available on GitHub is still early, but Microsoft is encouraging developers to play around with it, poke holes, and see what they can come up with.