https://github.com/griush/zglfw
Zig GLFW bindings
https://github.com/griush/zglfw
zig
Last synced: 14 days ago
JSON representation
Zig GLFW bindings
- Host: GitHub
- URL: https://github.com/griush/zglfw
- Owner: griush
- License: mit
- Created: 2025-01-03T15:25:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-06T15:01:31.000Z (over 1 year ago)
- Last Synced: 2025-02-23T07:17:21.327Z (over 1 year ago)
- Topics: zig
- Language: Zig
- Homepage:
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# zglfw
Zig GLFW bindings
## Usage
Run `zig fetch --save git+https://github.com/griush/zglfw`.
Add in `build.zig`:
```zig
// module links libc
const zglfw = b.dependency("zglfw", .{});
module.addAnonymousImport("glfw", .{
.root_source_file = zglfw.path("glfw3.zig"),
.target = target,
.optimize = optimize,
});
if (builtin.os.tag == .windows) {
module.addLibraryPath(zglfw.path("bin/windows-mingw64/"));
module.linkSystemLibrary("Gdi32");
}
module.linkSystemLibrary("glfw3");
```