Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewrk/zig-window
window client library
https://github.com/andrewrk/zig-window
zig
Last synced: 8 days ago
JSON representation
window client library
- Host: GitHub
- URL: https://github.com/andrewrk/zig-window
- Owner: andrewrk
- Created: 2018-06-09T05:04:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-20T21:22:05.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T15:07:18.859Z (15 days ago)
- Topics: zig
- Language: C++
- Size: 1.03 MB
- Stars: 117
- Watchers: 20
- Forks: 13
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-zig - zig-window🗒️window client library
README
# zig-window
## My Vision
A window client library. It gives you an API for creating windows, possibly
fullscreen, a graphics context, and events associated with the windows, such
as mouse and keyboard input.* No dependency on libc or any C libraries
* Cross platform:
* X11
* Windows
* MacOS
* Wayland
* Graphics contexts:
* Vulkan
* DirectX
* Metal
* OpenGL## Current Status
It's a proof-of-concept of a Vulkan "Hello World" triangle, whose binaries
are portable across different Linux distributions, even ones that have
nonstandard dynamic linkers."how it works" writeup is TODO.
### Building
Tested with Zig 0.7.0+479f259ea.
```
zig build -Dtarget=x86_64-linux
patchelf --remove-needed libdummy.so.0 zig-cache/bin/static-window
./zig-cache/bin/static-window
```The `-Dtarget` parameter is important if you want to put the binary up for
downloading - this makes Zig target the "baseline" CPU instead of using
the fancy cool features of your native CPU.This should work just fine on other CPU architectures though; for example you
could change `x86_64` to `aarch64` for 64-bit ARM.Removing the external dependency on `patchelf` is TODO.
Reported to work on these systems so far:
* Ubuntu
* Debian
* NixOS
* Arch Linux
* clearlinux
* glibc-based void linux
* musl-based void linuxPlease file an issue if you find that `vkcube` from your package manager works
but binaries produced by this project do not.