# Are there any good windowing libraries?

**URL:** <https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508>\
**Category:** Help\
**Tags:** c, build-system, zig-master\
**Created:** [August 16, 2025, 8:41pm UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508 "2025-08-16T20:41:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kierteiyu](https://ziggit.dev/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@Kierteiyu](https://ziggit.dev/u/Kierteiyu)\
**Post date:** [August 16, 2025, 8:41pm UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/1 "2025-08-16T20:41:00Z")

</div>

I tried using GLFW with Zig’s C interop. However, I couldn’t figure that out after several hours.

All of the GLFW bindings I found are designed for Zig 0.14, however I am using 0.15 currently.

Are there any good windowing libraries (or bindings) for zig?

---

<div class="post-metadata">

**Author:** ![floooh](https://ziggit.dev/user_avatar/ziggit.dev/floooh/32/2989_2.png) [@floooh](https://ziggit.dev/u/floooh)\
**Post date:** [August 16, 2025, 10:04pm UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/2 "2025-08-16T22:04:36Z")

</div>

Shameless plug, but you could give sokol a try, the ‘GLFW equivalent’ is `sokol.app`. It’s originally a C library, but with somewhat ‘idiomatic bindings’.

The C project is here:

> **[GitHub - floooh/sokol: minimal cross-platform standalone C headers](https://github.com/floooh/sokol)**
>
> minimal cross-platform standalone C headers

Bindings with Zig examples are here:

> **[GitHub - floooh/sokol-zig: Zig bindings for the sokol headers...](https://github.com/floooh/sokol-zig)**
>
> Zig bindings for the sokol headers (https://github.com/floooh/sokol)

…and a simple Dear ImGui example:

> **[GitHub - floooh/sokol-zig-imgui-sample: Sample to use sokol-zig bindings with Dear ImGui](https://github.com/floooh/sokol-zig-imgui-sample)**
>
> Sample to use sokol-zig bindings with Dear ImGui

You’ll need the very latest nightly, which has a package-fetch problem on Windows. On macOS or Linux you should be fine.

PS: expect some limitations compared to GLFW or SDL though, mainly that only single-window-apps are supported and instead of an “own the game loop” model there are frame- and event-callbacks. In exchange you get better web support and builtin support for D3D11, Metal, WebGL and WebGPU. I wrote sokol-app originally to get some sort of simple window- and input-support at all across all platforms supported by sokol-gfx without having to pull in a GLFW or SDL dependency, not really as a fully-featured GLFW replacement 🙂

---

<div class="post-metadata">

**Author:** ![Kierteiyu](https://ziggit.dev/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@Kierteiyu](https://ziggit.dev/u/Kierteiyu)\
**Post date:** [August 17, 2025, 1:07am UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/3 "2025-08-17T01:07:08Z")

</div>

Sokol looks awesome, however I am unfortunately stuck on the affected Windows at the moment.

Are there any plans to fix that soon?

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [August 17, 2025, 2:01am UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/4 "2025-08-17T02:01:42Z")

</div>

What do you actually want to do with the window?  
Do you want to use some particular graphics api or not?  
Any specific criteria?

I think using 0.14 would give you more options, because it is likely they target either 0.14 or 0.14.1 or whatever is the latest mach nominated version.

At least I haven’t seen many graphics related projects that track zig master.

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [August 17, 2025, 2:07am UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/5 "2025-08-17T02:07:27Z")

</div>

@castholm’s project states in the readme that it supports both 0.14.1 and 0.15.0-dev (master):

> [@SDL3 ported to the Zig build system (with example games)](https://ziggit.dev/t/sdl3-ported-to-the-zig-build-system-with-example-games/7606):
>
> 2024 is drawing its last breath and just in time for the new year, I’ve completed my port of [SDL3](https://github.com/libsdl-org/SDL) to the Zig build system. SDL3 is still in preview (current version: 3.1.6), but its ABI is stable as of 3.1.3 and it has been used in production by Valve for some time now. The goal for this package was an SDL build that Just Works™ with as few prerequisites and caveats as possible. To my knowledge, this is the first port of SDL that simultaneously supports Zig 0.12.1, 0.13.0 and 0.14.0-dev, bu…

---

<div class="post-metadata">

**Author:** ![Kierteiyu](https://ziggit.dev/letter_avatar_proxy/v4/letter/k/e9a140/32.png) [@Kierteiyu](https://ziggit.dev/u/Kierteiyu)\
**Post date:** [August 17, 2025, 2:15am UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/6 "2025-08-17T02:15:02Z")

</div>

Just vulkan. All I actually need is the windowing part.

SDL3 zig port looks awesome. I’ll check that out.

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [August 17, 2025, 2:28am UTC](https://ziggit.dev/t/are-there-any-good-windowing-libraries/11508/7 "2025-08-17T02:28:06Z")

</div>

Maybe you could do something similar to the example from [https://github.com/Snektron/vulkan-zig/tree/master?tab=readme-ov-file#example](https://github.com/Snektron/vulkan-zig/tree/master?tab=readme-ov-file#example) it seems it uses GLFW in a relatively minimal way, but it uses a system dependency.
