HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
windows-rs
Rust2020–2026
microsoft / windows-rs

windows-rs

Rust for Windows

39Distinct people
52Mentions
0Explicit recommenders
12.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Rust for Windows

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year52 dated mentions

Observed mentions: 2020-04-30 18:55:26 UTC to 2026-06-13 16:51:19 UTC.

0510152020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 14 mentions; 2 submissions, 12 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 14 mentions; 1 submissions, 13 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC716
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC14212
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC14113
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC514
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC523

What Hacker News says

52 sources
Yeah, Win32 (Windows API) will be around for a long time one way or the other, and there is a ton of tooling and docs around it. Even for non-Windows usage it is to be considered in certain situations. > Don't be swayed by the propaganda. Especially if your application has essentially no untrusted input. Even without untrusted inputs, in 2026 one should think twice before selecting C++ for a new project. There are still some reasons to do so, of course, but Win32 isn't one of them -- one can use it from a memory safe language just fine, e.g. https://github.com/microsoft/windows-rs
In Windows native app development is a mess
Actually the `windows-rs` team weighed in: impl IRibbonExtensibility_Impl for Addin_Impl { unsafe fn GetCustomUI( &self, _ribbon_id: windows::core::Ref<BSTR>, out: windows::core::OutRef<BSTR>, ) -> HRESULT { log("GetCustomUI called()"); if out.is_null() || out.write(BSTR::from(RIBBON_XML)).is_err() { return E_POINTER; }; S_OK } } https://github.com/microsoft/windows-rs/issues/3832 Thanks for pushing on the issue! I've updated the blog post for GetCustomUI.
In COM Like a Bomb: Rust Outlook Add-in
FYI, I believe your updated signature is still incorrect. You have: unsafe fn GetCustomUI(&self, _ribbon_id: *const BSTR, out: *mut BSTR) -> HRESULT {} But as linked in bri3d's post, the original C++ signature is: STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR* RibbonXml); It really is true that the second parameter is a pointer to BSTR and the first is not. This difference is because the second parameter is an out parameter. Ultimately, I think windows-rs is at fault here for confusing API design. The BSTR type that it defines is fundamentally different from the BSTR type in C++. The Rust BSTR has a destructor and is always owned, whereas the C++ BSTR is just a typedef for a raw pointer which may be considered owned or borrowed depending on the context. It's not like C++ doesn't support destructors; this particular type just d
Read the rest
oesn't use them. It makes sense for Rust bindings to define a safe wrapper type with a destructor. But if I were designing the bindings, I would have given the wrapper a different name from the original type to make the difference in semantics more obvious. The Rust BSTR type is still ABI-compatible with the C++ one (because it's repr(transparent)), so it can be valid to use it in FFI definitions, but only if that BSTR happens to be owned (like with the second parameter). A more thorough wrapper for BSTR would provide a safe borrowed type in addition to the owned type, like what &str is to String. But it appears that windows-rs doesn't provide such a type. However, windows-rs does provide an unsafe type which can be used for the purpose. Confusingly, this type is also named BSTR, but it's defined in the windows-sys crate instead of windows-strings. This BSTR is like the C++ BSTR, just an alias for a raw pointer: https://docs.rs/windows-sys/latest/windows_sys/core/type.BST... You should probably use that type for the _ribbon_id parameter. Or you could just manually write out `*const u16`. But not `*const BSTR`, which is a pointer to a pointer. `*const BSTR` happens to be the same size as `BSTR` so it doesn't cause problems for an unused parameter, but it would break if you tried to use it. Which probably doesn't matter to your application. But since you published a "correct signature for future LLMs", you should probably fix it. See also this issue report I found (not exactly on point but related): https://github.com/microsoft/windows-rs/issues/3230
In COM Like a Bomb: Rust Outlook Add-in
Supposedly is being worked on for making it more Native AOT friendly. How we got into this mess? WinDev and DevDiv politcs. After the Longhorn debacle, its technologies landed on DevDiv, like WCF and WPF. Sinofsky and friends never were that keen in having .NET coming into their turf, it is no surprise that Hilo sample for Windows 7, then praises COM and C++ for Windows applications[0][1]. Then coming in this path, WinRT came to be, with roots as how .NET was being designed, before Microsoft decided to pivot it as another Java like technology[2]. A bunch of folks in WinDev, weren't happy with C++/CX, so they united to replace it with C++/WinRT, because extensions, when clang and GCC are full of extensions, promised to give back a C++/CX like developer experience in 2017[3], never delivered, went to have fun with Rust/WinRT. Now C++/WinRT
Read the rest
is in maintenance mode[4], and Rust/WinRT never took off, and is now Rust/windows-rs[5]. As paying customer, impacted by those childish attitudes, I would have had the whole team fired. Finally, check the amount of bugs and complaints on their respective repos, https://github.com/microsoft/microsoft-ui-xaml https://github.com/microsoft/WindowsAppSDK https://github.com/microsoft/cppwinrt/ And then compare with Project Reunion vision from 2021, and where we are three years later https://blogs.windows.com/windowsdeveloper/2021/03/29/announ... Mainly because along the way, as if those changes weren't enough, they also decided to reboot their initial approach with Project Reunion, WinAppSDK took another route, and here we are. This is only a short overview of how WinRT went down since Windows 8, thus only those that never advocated for it, can honestly suggest WinUI, as they lack the background of how chaotic it all is. [0] - https://devblogs.microsoft.com/cppblog/announcing-hilo/ [1] - https://learn.microsoft.com/en-us/previous-versions/msdn10/f... [2] - https://arstechnica.com/features/2012/10/windows-8-and-winrt... [3] - https://www.youtube.com/watch?v=7TdpWB_vRZM&t=2983s [4] - https://github.com/microsoft/cppwinrt/issues/1289#issuecomme... [5] - https://github.com/microsoft/windows-rs
In Writing GUI apps for Windows is painful
It's a shame that, unlike with Win32, using WinUI places pretty harsh restrictions on which programming languages and environments you can use. Only C# and C++ are supported, the latter only with Microsoft compilers. For everything else, including Rust[1], Python and MinGW C/C++, there is no answer for OP's question, and the effect of this on the visual consistency of the Windows desktop is obvious - there is none. Every third-party app uses a different toolkit with a different look and feel, because the library providing the standard look and feel simply isn't available to the majority of developers. [1]: https://github.com/microsoft/windows-rs/pull/1836
In Ask HN: What is the best way to build a desktop app in Windows in 2023?

Showing the 15 most recent of 52 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.