{"id":21317847,"url":"https://github.com/zig-gamedev/zglfw","last_synced_at":"2025-07-10T13:33:57.243Z","repository":{"id":263868886,"uuid":"882832638","full_name":"zig-gamedev/zglfw","owner":"zig-gamedev","description":"Zig build package and bindings for GLFW","archived":false,"fork":false,"pushed_at":"2025-04-19T00:21:37.000Z","size":446,"stargazers_count":23,"open_issues_count":4,"forks_count":22,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-19T10:00:49.100Z","etag":null,"topics":["bindings","gamedev","glfw","zig"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zig-gamedev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-03T21:42:48.000Z","updated_at":"2025-04-19T00:21:40.000Z","dependencies_parsed_at":"2024-12-15T01:19:22.039Z","dependency_job_id":"36d61e63-452c-45e2-ac13-879d68cf839a","html_url":"https://github.com/zig-gamedev/zglfw","commit_stats":null,"previous_names":["zig-gamedev/zglfw"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zig-gamedev/zglfw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-gamedev%2Fzglfw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-gamedev%2Fzglfw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-gamedev%2Fzglfw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-gamedev%2Fzglfw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zig-gamedev","download_url":"https://codeload.github.com/zig-gamedev/zglfw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-gamedev%2Fzglfw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264585372,"owners_count":23632647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","gamedev","glfw","zig"],"created_at":"2024-11-21T19:09:08.660Z","updated_at":"2025-07-10T13:33:57.237Z","avatar_url":"https://github.com/zig-gamedev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [zglfw](https://github.com/zig-gamedev/zglfw)\n\nZig build package and bindings for [GLFW 3.4](https://github.com/glfw/glfw/releases/tag/3.4)\n\n## Getting started\n\nExample `build.zig`:\n```zig\npub fn build(b: *std.Build) void {\n    const exe = b.addExecutable(.{ ... });\n\n    const zglfw = b.dependency(\"zglfw\", .{});\n    exe.root_module.addImport(\"zglfw\", zglfw.module(\"root\"));\n\n    if (target.result.os.tag != .emscripten) {\n        exe.linkLibrary(zglfw.artifact(\"glfw\"));\n    }\n}\n```\n\nNow in your code you may import and use `zglfw`:\n```zig\nconst glfw = @import(\"zglfw\");\n\npub fn main() !void {\n    try glfw.init();\n    defer glfw.terminate();\n\n    const window = try glfw.createWindow(600, 600, \"zig-gamedev: minimal_glfw_gl\", null);\n    defer glfw.destroyWindow(window);\n\n    // or, using the equivilent, encapsulated, \"objecty\" API:\n    const window = try glfw.Window.create(600, 600, \"zig-gamedev: minimal_glfw_gl\", null);\n    defer window.destroy();\n\n    // setup your graphics context here\n\n    while (!window.shouldClose()) {\n        glfw.pollEvents();\n\n        // render your things here\n        \n        window.swapBuffers();\n    }\n}\n```\n\nSee [zig-gamedev samples](https://github.com/zig-gamedev/zig-gamedev/tree/main/samples) for more complete usage examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-gamedev%2Fzglfw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzig-gamedev%2Fzglfw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-gamedev%2Fzglfw/lists"}