Microsoft unveils Rust for Windows v0.9, with 'full consumption support' for the Windows API

Rust/WinRT moniker consigned to the garbage collection


Microsoft has released an update for Rust for Windows (formerly Rust/WinRT) with completed support for Win32 and COM APIs.

Version 0.9 of the Rust language projection turned up last week and, according to Microsoft, gives "access to the entire Windows API surface in a language-idiomatic way."

It's a tacit admission that no matter how much Microsoft might hope it will, the Win32 API does not seem to be going anywhere any time soon. Even the most beloved of languages will struggle to avoid a dip into the API of yesteryear if it is to run efficiently on the Windows platform.

El Reg gives it a spin

While it has been possible for the adventurous to delve into the API, "completed consumption" support makes things considerably easier. We had a crack at Microsoft's Hello World example using Visual Studio Code and found the process relatively straightforward, even if the download size of the components required dwarfed the diminutive message box.

The former "Rust/WinRT" label has been ditched in favour of "Rust for Windows" in this release and as well as support for Win32 and COM APIs in the windows crate (enabled by the win32metadata project) build times and error handling have been improved.

"To reduce build time, use a bindings crate rather than simply a module," advised Microsoft. Not a bad idea – once Cargo had cached results, we found subsequent builds of our "Hello World" considerably snappier both from Visual Studio Code and command line.

Other changes include the preservation of original API case (which might affect existing code) and the ability to build the windows crate under Linux.

Rust topped the "loved" leaderboard in the 2020 Stack Overflow developer survey and Microsoft has been investing in making the venerable Win32 API (and its ilk) more accessible to fans of the language. As well as the update, an experimental documentation generator has been published along with a range of samples.

The update comes just over a year after the project's debut in preview form on GitHub and Microsoft talked up the project at the beginning of this year. The roadmap continues to call for the publication of the projection by the end of 2021. ®


Other stories you might like

  • NASA installs a new and improved algorithm to better track near-Earth asteroids

    Nearly 20 year-old software used to protect humanity gets an upgrade

    NASA has upgraded its near-Earth asteroid monitoring algorithm to model hazardous space rocks more accurately after nearly two decades, it announced on Tuesday.

    The new system, dubbed Sentry-II, is more powerful than its predecessor, Sentry. Astronomers working at the space agency's Center for Near Earth Object Studies can now automatically calculate thermal influences that nudge an asteroid’s orbit, potentially sending it hurtling towards our home planet.

    The so-called Yarkovsky effect describes the subtle and gradual change of motion when asteroids are heated by the Sun’s light. When asteroids spin, one side of its surface exposed to the star gets heated. As it continues to rotate, the hot region enters shade and cools down. Infrared energy is radiated outwards; the photons carry momentum and impart a tiny thrust on the asteroid. Over long periods of time, these small kicks can change their paths and knock them out of their original orbit.

    Continue reading
  • Facebook slapped with an eyepopping $150B lawsuit for spreading hate speech against Rohingya refugees

    Lawsuit claims social media giant's algos helped Myanmar military crackdown on the Rohingya

    Meta was sued on Tuesday for a whopping $150 billion in a class-action lawsuit for allegedly amplifying hate speech and aiding the Myanmar military in the genocide of the Rohingya people.

    The case, led by an anonymous Rohingya refugee living in the US, accuses the entity formerly known as Facebook of inciting hatred and inflicting real harm on the predominantly Muslim group for years. Not only did the social media platform ignore hate speech posts, it's alleged that the service's algorithms actively promoted anti-Rohingya propaganda as hundreds of thousands of people fled from Myanmar to escape persecution.

    Facebook has already acknowledged its role in the campaign, which saw an estimated 25,000 people perish and 700,000 forced from the country. The lawsuit also comes after ex-employee and whistleblower Frances Haugen leaked internal documents demonstrating how its algorithms prioritized engagement over safety.

    Continue reading
  • Power management IC shortage holding cars, laptops, hostage

    Couple of cents-worth of kit causing big problems for the year to come

    The shortage of power management chips is worsening and holding back companies from building cars, PCs and items with batteries or an on-off switch, Trendforce said in a study this week.

    Power management ICs cost just a few cents, and are among cheap chips that include display driver and USB-C components that are in short supply. These chips are as important to PCs and other electronics as CPUs or memory.

    The demand for PMICs has gone through the roof with the emergence of electric cars and growing demand for PCs and consumer electronics during the past 20 plus months. Trendforce expects the prices will go up by 10 per cent to a six-year high of $0.23.

    Continue reading

Biting the hand that feeds IT © 1998–2021