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 …
Monday 10th May 2021 14:51 GMT Rich 2
Extend and extinguish…. Again?
Sounds like it to me - trying to hook rust peeps on windows-specific APIs?
On one hand it’s a reasonable thing to add, but I can’t help my cynicism and MS past behaviour tainting that view.
Also, I couldn’t help wondering if “completed consumption” is some sort of MS strain of tuberculoses? :-)
Monday 10th May 2021 19:14 GMT bazza
Re: Extend and extinguish…. Again?
Well, if one wants to programme on Rust for Windows, the developer is already headed towards Windows specific APIs anyway.
Providing a neat, tidy and complete binding, automatically derived from the actual Win32 (and other) API libraries and header files, is looking like an effective strategy to making it easy to support languages other than C. The automated generation of the binding effectively ensures that devs can have confidence in it, which can only help.
Given that this is basically lending a hand to what is rapidly becoming a seriously important community project (Rust), it can't really be viewed as anything other than an honest gift. There's no sign that MS has any intention of forking the language in an attempt to skew the market (like they did with Java all those years ago).
What will be interesting I think is to see just what happens in the next few years with Rust in application development. There's a lot to recommend it for applications as well as OSes. Ready access to all the APIs can only help.
Tuesday 11th May 2021 07:05 GMT big_D
Re: Extend and extinguish…. Again?
Rust is a safe and system level programming language. That means that, Rust is a system level language, not a platform independent language. You will need to target each platform individually.
Providing a bunch of interfaces/functions that provide that support directly in Rust, as opposed to the programmer having to slog through the Win32 documentation and write their own interface calls, and hope they read the documentation correctly and have safely implemented the calls, will save a lot of time.
The same has always been the case for similar languages, such as C and C++, on Windows you either had MFC or WPF from Microsoft or OWL from Borland to provide the integration of the OS into your applications. Linux, macOS and other platforms have their own classes / interfaces for programming on them.
AFAIK, Microsoft aren't re-writing the Rust language, they are only providing translation layer libraries to make it easier for programmers, so they don't have to keep re-inventing the wheel.
Looking at the source code on Git, it is just a list of published interfaces. If you are programming on Linux, you'll need similar interfaces, the same of macOS or Android etc.
Monday 10th May 2021 22:48 GMT Kev99
Tuesday 11th May 2021 07:12 GMT big_D
Have you actually looked at the Rust for Windows source? It is a bunch of interface definitions, to allow programmers to target Windows for application development.
They aren't changing the language. Just like MFC, OWL, KDE or GTK class libraries for C++, for Windows and Linux, for example.
A lot of I/O and thread management is platform specific, for example, and you need the relevant interfaces in order to be able to develop fully functional applications on each platform.
Rust is at the same level as C/C++ and not a platform independent language, like Java.
Tuesday 11th May 2021 07:17 GMT Maximus Delfango
Is anyone using Rust for anything hefty?
Is anyone reading this using Rust for anything hefty? It seems an intriguing language, but I haven't get given myself the mental push to give it a go.
Come to think of it, it anyone using WinRT as well for anything?
Honest questions, not trying to start something (apart from a discussion).
Wednesday 12th May 2021 04:30 GMT _andrew
Re: Is anyone using Rust for anything hefty?
Well apparently fairly significant chunks of Firefox are in rust now (and all of Servo), and Dropbox seem to have used it to scale up their synchronization thing: https://dropbox.tech/infrastructure/rewriting-the-heart-of-our-sync-engine
Each of those have a few users.