Live data from Hacker News

Rust/WinRT Public Preview

blogs.windows.com

131–140 of 219 posts

Re: Rust/WinRT Public Preview

#131
post #15

You have to hand it to Microsoft: It may be the only large software company that doesn't seem susceptible to not-invented-here syndrome. It's true that Microsoft historically has been an intensely competitive company, often trying to undermine competing technologies, e.g., with "embrace and extend" strategies. But whenever a competing technology -- whether a language, or a framework, or an application -- gains adopti…

> It may be the only large software company that doesn't seem susceptible to not-invented-here syndrome. .NET?

Many developers don't know that C# began in essence as a response to a lawsuit from Sun, sound familiar?

https://en.wikipedia.org/wiki/Visual_J%2B%2B#Sun's_litigatio...

Re: Rust/WinRT Public Preview

#132
post #5

I start to understand the Windows team desire for this WinRT. You can flow through time with these language bindings without being locked into a programming language. .NET, JS, C++ and now Rust. That is seriously cool.

It's been a reality on Windows for over 20 years, though. COM has made it possible to write applications on Windows and integrate with pretty much anything in it in any language with COM bindings. Glad to see Rust is now one more such language.

WinRT is actually built on COM, Rust/WinRT uses it under the hood

Re: Rust/WinRT Public Preview

#133
post #2

I'm super excited for this! I do wish that they'd ressurect their JavaScript projection for the runtime though. Especially with their focus on React Native, it'd be awesome not to need a "native" module to call Windows APIs. That being said, I also hope Rust/WinRT becomes a valid native module format for React Native (though I suspect it won't since that would likely require React Native developers to have the Rust t…

Something like this already exists: https://github.com/NodeRT/NodeRT

Re: Rust/WinRT Public Preview

#134

Never really understood whether WinRT binds me to store apps, sandboxes, appx and so on. Can I develop a single windows app with this that runs on Windows 10 desktop as a win32 app does (such as a plugin to another application where I can’t can’t decide the deployment model)?

It's a spectrum. You can already use (some) WinRT features on desktop/console win32 apps, even unsandboxed[0].

You can use UWP XAML in win32 desktop apps with a sandbox, and you'll probably be able to use it without a sandbox when WinUI 3 comes out (currently in early preview, they'll probably have a couple sessions about it at Build)

[0] some APIs require your app to have an identity though, and you need the sandbox for that

Re: Rust/WinRT Public Preview

#135

Earlier quoted context omitted.

It seems like they're doing all they can to get developers on their platform. Not to establish Windows developers like they have in the past, but to have others see Windows as just another platform. We're reaching a revolution from moving from x86 to ARM and I think the more Microsoft positions themselves like this, the less likely they are to be left in some weird compatibility limbo. As weird as this sounds, I feel…

In fact, the _have_ transitioned to ARM, way back around the time of the first Surface tablet. Windows and Office have been running on ARM since at least, what, 2012?

Way before that they had ARM-based Pocket PCs running Windows CE (or Windows Mobile).

Re: Rust/WinRT Public Preview

#136
post #5

I start to understand the Windows team desire for this WinRT. You can flow through time with these language bindings without being locked into a programming language. .NET, JS, C++ and now Rust. That is seriously cool.

It's been a reality on Windows for over 20 years, though. COM has made it possible to write applications on Windows and integrate with pretty much anything in it in any language with COM bindings. Glad to see Rust is now one more such language.

Yeah though... pretty much any natively compiled language and many interpreted/VM-based languages can use the C ABI in any modern plaform anyway, so what COM provides isn't so much the ability to use the same API from many languages but a dynamic object oriented approach for doing so.

After all it isn't like you can't use the Win32 API directly from Rust - or any other language, e.g. Python.

Re: Rust/WinRT Public Preview

#137
Well this really confused me as I thought Microsoft had discontinued the Windows RT operating system. It turns out that they also have a platform-agnostic application architecture, ingeniously named WinRT.

Re: Rust/WinRT Public Preview

#138

https://github.com/robmikh/minesweeper-rs - I just love how they brilliantly avoided mixing up C++/COM things into this. Tough one to pull when you're dealing with bindings for a foreign language. The code looks fairly standard Rust (except maybe for the winrt::import that looks like Go?). > If you are familiar with Rust, you will notice this looks far more like Rust than it looks like C++ or C#. Notice the snake_cas…

It seems like they're doing all they can to get developers on their platform. Not to establish Windows developers like they have in the past, but to have others see Windows as just another platform. We're reaching a revolution from moving from x86 to ARM and I think the more Microsoft positions themselves like this, the less likely they are to be left in some weird compatibility limbo. As weird as this sounds, I feel…

It will be very difficult until Windows is POSIX-compatible. Whatever that means, I don't know. But it can't just be the Windows Subsystem for Linux. The whole OS needs to have POSIX compatibilities.

Re: Rust/WinRT Public Preview

#139
post #95
post #85

With Windows 7 on its way out slowly, WinRT is becoming more palatable.

Slowly?! Hasn't Win7 been dead for years? > Latest release Service Pack 1 (6.1.7601) / February 22, 2011; 9 years ago > Mainstream support for Windows 7 ended on January 13, 2015. There is: > Extended support for Windows 7 ended on January 14, 2020. But that is referring to very specific business contracts, not casual users pretending EOL never happened.

> Slowly?! Hasn't Win7 been dead for years?

No. Microsoft wants to kill it, but... even just checking Steam's hardware survey (users of which are more likely to upgrade so chances are overall PC usage of Win7 is higher) there is a combined ~7% of users on Win7.

With ~25M concurrent users the last 48 hours, that means there were more than 1.7M users running on Win7 just within the last two days.

FWIW these numbers are a bit lower than 10 times the Linux numbers of all distros combined.

Re: Rust/WinRT Public Preview

#140

Earlier quoted context omitted.

C++/WinRT and C++/CX are not the same; they are different enough that Microsoft Docs has a whole page explaining how to move from C++/CX to C++/WinRT: https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-a... In particular only the older C++/CX has ^ pointers or other Microsoft-specific C++ language extensions. C++/WinRT is standard C++. Writing your code using WRL (Windows Runtime C++ template Library) is good…

Updated my post - I had forgotten C++/WinRT discarded the ^ syntax as we skipped C++/WinRT for our development as it suffers from many of the same problems of C++/CX.

> it suffers from many of the same problems of C++/CX

The whole point of C++/WinRT is to be 100% standards-compliant C++. The guy who created it didn't even work at Microsoft at the time.

Post reply on HN