Making Win32 APIs More Accessible to More Languages

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. win32metadata

    Tooling to generate metadata for Win32 APIs in the Windows SDK.

    Interesting. The real thing here is the Win32 Metadata project: https://github.com/microsoft/win32metadata

    It contains definitions that can be used to automatically generate bindings to any language. So, we have C# and Rust as examples, but the very same definitions could be used with languages like Zig.

    Very cool initiative.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. go

    The Go programming language

    Golang is also considering consuming this new metadata: https://github.com/golang/go/issues/43838

  4. sokol-zig

    Zig bindings for the sokol headers (https://github.com/floooh/sokol)

    I'm tackling this issue from two sides:

    (1) Change the C-API to make it more "binding-generator-friendly", for instance by adding a range/slice-struct to th C-API which bundles a pointer and associated size, or specially named typedefs that only exist to give the binding generator hints for special case handling.

    (2) Make the bindings-generator configurable on a per-language and per-API basis, this can be as simple as a map which overrides type- and function-names, or injects manually written code into the generated bindings.

    The goal is to make the generated bindings more idiomatic to the target language.

    This mostly works if you have control over the underlying C-API of course, e.g. the language bindings are created by the original C-library project, not as an external project to convert a fixed C-API.

    I wrote a blog post about this whole topic:

    https://floooh.github.io/2020/08/23/sokol-bindgen.html

    ...and here's an example of one such semi-auto-generated Zig bindings, note the two "injected" helper functions at the top:

    https://github.com/floooh/sokol-zig/tree/master/src/sokol

    ...for instance note the "injected" helper functions here:

    https://github.com/floooh/sokol-zig/blob/1c93f60ad178869b84d...

  5. sokol-samples

    Sample code for https://github.com/floooh/sokol

    C99 has made all that a lot easier, you can setup, initialize a struct and call the function taking a pointer to that struct all in one call:

    https://github.com/floooh/sokol-samples/blob/89f5825ab5d3690...

    The Win32 window system functions and D3D11 are actually very convenient to work with in C99, better than C++ actually.

  6. JNA

    Java Native Access

    I was the de facto maintainer of JNA (https://github.com/java-native-access/jna) win32 bindings for years. The API metadata is welcome - we have always based all work on header files in the visual studio / windows SDK. Now there’s a change to generate that code - someone might want to try to replace hand crafted mappings in JNA with generated ones - there’s a huge test suite to work with.

  7. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Learning GO: Loops and Conditionals

    1 project | dev.to | 20 Mar 2025
  • Solving Authentication Challenges with Azure Communication Services SMTP Relay

    1 project | dev.to | 19 Mar 2025
  • Learning GO: A new beginning

    1 project | dev.to | 14 Mar 2025
  • How to distrust a CA without any certificate errors

    1 project | news.ycombinator.com | 7 Mar 2025
  • Tokio and Prctl = Nasty Bug

    4 projects | news.ycombinator.com | 23 Feb 2025

Did you know that C is
the 6th most popular programming language
based on number of references?