HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
wil
C++2019–2026
microsoft / wil

wil

Windows Implementation Library

10Distinct people
26Mentions
0Explicit recommenders
3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Windows Implementation Library

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

No other repository is repeatedly linked in the same discussions.

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 year26 dated mentions

Observed mentions: 2019-05-09 00:15:35 UTC to 2026-06-14 14:36:13 UTC.

02462019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-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): 4 mentions; 0 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 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
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC422
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC615
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
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 UTC404
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC615

What Hacker News says

26 sources
The blogger and the blog says: > BTW: As a nice addition, if you use SAL annotations > Windows C++ Programming Not everyone will see the irony, but the Windows user-mode application and library suite and the kernel now very heavily rely on the safety mechanisms of C++ that the author calls 'complex', 'uglif[ied]', and has 'los[t] the taste for good readable code'. I'm of course referring to the Windows Implementation Library: https://github.com/microsoft/wil This is explicitly an effort from MS WinDev to make Windows C++ code safer. User-mode applications writing native Windows code can and absolutely should use it, too. Any time I see `void*` in C++ I ring-fence it as a C-ism and make sure I `reinterpret_cast`. For me, a bag of bytes is `std::span<std::byte>`. void* is a memory location with no provenance, no ownership, no size informati
Read the rest
on, nothing. Do I even know if it is this program's memory, or some shared memory construct, or maybe even a pointer into GPU memory? No for all. C likes to play fast and loose and its proponents call it 'beautiful and simple', I call it a segfault/use-after-free/double-free waiting to happen.
In The beauty and simplicity of the good old C-style void* in C++
No one should use any of these weird Frankenstein monstrosities in 2026. And a batch script? :( PowerShell exists. Install: - contrary to the blog post, the entirety of Visual Studio, because the IDE and debugger is *really damn good*. - LLVM-MinGW[1] Load the 'VSDevShell' DLL[2] for PowerShell, and you're good to go, with three different toolchains now: cl.exe from VS clang-cl.exe—you don't need to install this separately in VS; just use the above-mentioned llvm-mingw clang.exe as `clang.exe --driver=cl /winsysroot <path\to\Windows SDK> /vctoolsdir <path\to\VC>`. Or you can use it in GNU-driver-style mode, and use -Xmicrosoft-windows-sys-root. This causes it to target the Windows ABI and links against the VS SDK/VC tools `clang.exe` that targets the Itanium ABI and links against the MinGW libraries and LLVM libc++. Done and
Read the rest
dusted. Load these into a CMake toolchain and never look at them again. People really like overcomplicating their lives. At the same time, learn the drawbacks of all toolchains and use what is appropriate for your needs. If you want to write Windows drivers, then forget about anything non-MSVC (unless you really want to do things the hard way for the hell of it). link.exe is slow as molasses, but can do incremental linking natively. cl.exe's code gen is (sometimes) slightly worse than Clang's. The MinGW ABI does not understand things like SAL annotations[3], and this breaks very useful libraries like WIL[4] (or libraries built on top of them, like the Azure C++ SDK[5] The MinGW headers sometimes straight up miss newer features that the Windows SDK comes with, like cfapi.h[6]. [1]: https://github.com/mstorsjo/llvm-mingw [2]: https://learn.microsoft.com/en-gb/visualstudio/ide/reference... [3]: https://learn.microsoft.com/en-gb/cpp/c-runtime-library/sal-... [4]: https://github.com/microsoft/wil [5]: https://github.com/Azure/azure-sdk-for-cpp [6]: https://learn.microsoft.com/en-gb/windows/win32/cfapi/build-...
In I fixed Windows native development
Anything related to WinUI is a bad joke. Have fun following the discussions and amount of bugs, https://github.com/microsoft/microsoft-ui-xaml That C++ support that WinUI team marketing keeps talking about relies on a framework that is no longer being developed. > The reason the issues page only lets you create a bug report is because cppwinrt is in maintenance mode and no longer receiving new feature work. cppwinrt serves an important and specific role, but further feature development risks destabilizing the project. Additional helpers are regularly contributed to complimentary projects such as https://github.com/microsoft/wil/. From https://github.com/microsoft/cppwinrt/issues/1289#issuecomme...
In A Note on Fil-C
Great analysis, but the solution is so simple: RAII. And this is offered as `unique_process_handle`[1] in the Windows Implementation Library (WIL)[2]. This is a fantastic addition to the Windows developer's toolkit, which everyone should be using from the outset. The Windows C API is unnecessarily verbose (although this can be said of any OS, Windows' is particularly bad), and simple mistakes can and will happen. Let RAII help you, let the mighty close-scope token `} ` be your best friend. [1]: https://github.com/microsoft/wil/blob/1f20cd086e07b9be54e70d... [2]: https://github.com/microsoft/wil
In Finding a VS Code Memory Leak
> If it's not Cygwin, then what is it? Looking at the source code[1], it appears to be analogous to MinGW in the MinGW:GNU/Linux:Windows relationship, but replace with MinC:BSD:Windows. In other words, a minimal user-mode layer that presents BSD headers (and therefore BSD symbols, macros, and types), libraries, and core utils to end-users, thus abstracting over MSVC†. EDIT: replace 'MinGW' with 'Cygwin' above. So it is Cygwin. I'd say calling it a 'kernel' is quite a stretch—there is not much that runs in kernel-mode, and everything runs atop the NT kernel which does the actual 'kernel'y stuff. [1]: https://github.com/dboland/minc †: Until one wants to use very recent and very nice Microsoft libraries[2][3], and these fail spectacularly because MinGW doesn't know about nice MSVC-specific stuff like SAL annotations[4]. [2]: https://github.
Read the rest
In MinC Is Not Cygwin
> Although I don't start new projects in C very often, I'm acutely aware how it's not turtles all the way down (as the logophiles believe), but rather C. With some infrequent exceptions the whole tower of abstraction was written in C. SDL is written in C, the compiler? C, the Linux kernel is written in C, the graphics driver was written in C, the GPU firmware was C. It might be unfeasible for you to get by without writing these yourself, but with enough C and somewhere to sit you can move the earth. This is a Linux-only situation. A significant fraction of systems code in Windows and macOS are written in fairly modern C++, including core system libraries and the kernel. A project that emerged out of Windows' C++ effort is the Windows Implementation Library[1]. I'm also certain Windows and macOS graphics drivers are written in C++. [1]: ht
Read the rest
In Flappy Bird in 1000 lines of C
Here we go: a thread on developing for Windows, and immediately there are several top-level comments saying 'don't'. I suppose you guys like leaving 75% of a potential install base out of consideration. More money for us Windows devs, I guess. After having recently worked on a project at work that involved precisely this (migrating a Linux/macOS-first project to Windows), I feel like that table at the top is... not the whole story. I also disagree with the author's conclusion: the easiest and most compatible way to develop on Windows is to use Visual Studio 2022, full stop. Download, install the Desktop Development with C++ workload, and start writing code. Can't be easier. It comes with a built-in debugger, profiler, and various build tools like CMake, Ninja (if you don't like MSBuild/NMake), Clang-CL (if you don't like cl.exe), and much
Read the rest
more. My background is a little different to the author: I've been writing on and for Windows most of the time, and I was only introduced to Linux in university. In order of 'closeness to Linux': - WSL1/2: these are for all intents and purposes Linux VMs (yes, not in the case of WSL1, but practically it might as well be). Use these as though you would a real Linux machine. - Cygwin: in general, never use Cygwin for new projects. Cygwin means saddling your user with an entire Linux filesystem hierarchy per application, including stuff like `/bin`, `/etc`, `/lib`, and so on. Additionally, it pretends to support `fork()` on Windows. Windows and NT don't have fork(). Never had, and never will. Don't use it, full stop. - MinGW: this targets the Itanium C++ ABI. An admirable but sadly incomplete effort. New Win32 APIs like cfapi.h[1] aren't available. Big Windows-specific libraries like Microsoft's WIL[2] cannot compile on MinGW because they rely on MSVC-specific extensions. Deal-breaker for me. - MSVC providing cl.exe, and also LLVM's official Clang releases for Windows: best options. These target the MSVC C++ ABI and expect/provide a complete install of the Windows SDK and MSVC C and C++ runtimes. In general, I dislike shoehorning Linux/UNIX onto Windows and vice versa. System developers should recognise the differences between OS and platform-specific primitives, APIs, and interfaces, and abstract over them depending on their needs. Each implementation should live on its own and should be linked to by the build system, and not directly interspersed in code. This means no `#ifdef _WIN32 #elifdef DARWIN #elifdef __linux`. Or—and a hot take incoming—if you don't want to do any of this, use a platform-independent managed/interpreted language like Java, C#, Go, or Python. [1]: https://learn.microsoft.com/en-us/windows/win32/api/cfapi/ [2]: https://github.com/microsoft/wil/issues/117
In How to develop on Windows: comparing native, MinGW, Cygwin, WSL
Even then, MFC and C++/CX were the only productive ways to use it from Microsoft SDKs. .NET isn't as convenient as VB 6 was, fully embracing COM as the VBX replacement model, technically introduced in VB5, but still some stuff was lacking. Then there is Delphi and C++ Builder. It beat me that having doubled down on COM since how Longhorn went down, and Windows team getting their way doing avoiding .NET to take over, they hardly managed to create nice tooling as the competition. Editing IDL files with a Notepad like experience, manually merging generated code, and a couple of frameworks that barely go beyond yet another way to do AddRef/Release/QueryInterface and aggregation. Meanwhile D-BUS, XPC and AIDL, provide much better dev experience. Pity that Borland products are kind of tainted due to mismanagement decisions, otherwise maybe fixi
Read the rest
ng COM dev experience would already been seriously taken by VS team. Ah, nowadays WIL is probably the best approach when having only to consume COM. https://github.com/microsoft/wil
In C-Macs – a pure C macOS application
Not since Vista. https://docs.microsoft.com/en-us/cpp/build/reference/kernel-... > Creates a binary that can be executed in the Windows kernel. The code in the current project gets compiled and linked by using a simplified set of C++ language features that are specific to code that runs in kernel mode. And then there is WIL, https://github.com/microsoft/wil https://community.osr.com/discussion/291326/the-new-wil-libr... > First off, let me point out that this library is used to implement large parts of the OS. There are hundreds of developers here who use it. So unlike, uh, some other things that get tossed onto github, this project is not likely to wither and die tomorrow. > There are, however, only a handful of kernel developers working on the library, so the kernel support has been coming along much slower. I'd like to expand the exist
Read the rest
ing kernel features in depth ....
In RISC-V J extension – Instructions for JITs

Showing the 15 most recent of 26 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.