{"id":13534432,"url":"https://github.com/prime31/zig-upaya","last_synced_at":"2025-07-10T08:32:11.689Z","repository":{"id":48269371,"uuid":"282778837","full_name":"prime31/zig-upaya","owner":"prime31","description":"Zig-based framework for creating game tools and helper apps","archived":false,"fork":false,"pushed_at":"2022-07-03T17:11:04.000Z","size":527,"stargazers_count":130,"open_issues_count":2,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-02T21:32:12.132Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","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/prime31.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}},"created_at":"2020-07-27T02:51:01.000Z","updated_at":"2024-10-24T11:53:10.000Z","dependencies_parsed_at":"2022-09-09T09:01:04.718Z","dependency_job_id":null,"html_url":"https://github.com/prime31/zig-upaya","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-upaya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-upaya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-upaya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prime31%2Fzig-upaya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prime31","download_url":"https://codeload.github.com/prime31/zig-upaya/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629944,"owners_count":17499291,"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":[],"created_at":"2024-08-01T07:01:32.924Z","updated_at":"2024-11-20T20:43:14.715Z","avatar_url":"https://github.com/prime31.png","language":"Zig","funding_links":[],"categories":["Zig","Libraries"],"sub_categories":["Zig"],"readme":"# Upaya\n\u003e upaya: a means that goes or brings one up to some goal; skillful means\n\nZig-based framework for creating game tools and helper apps. Consists of the following:\n- *Sokol*: used for cross-platform window creation and rendering\n- *STB Image and Rect*: image loading, image saving and rect packing\n- *Tiny Filebrowser*: cross-platform filebrowsers and dialogs\n- *Dear ImGui*: needs no introduction\n- *Known Folders*: staple of many zig codebases. See the GitHub page: [known-folders](https://github.com/ziglibs/known-folders)\n\nUpaya provides a set of conveniences to speed up tool building:\n- *upaya.fs*: one-liners for saving/loading JSON/binary files\n- *upaya.mem*: C allocator and a temp allocator (just use and never free)\n- *upaya.menu*: helpers for managing a main menu bar\n- *upaya.colors*: ImGui color translations and helpers\n- *upaya.math*: math helpers and a random number generator\n\n## Getting Started\nFirst fetch Upaya: `git clone --recursive https://github.com/prime31/zig-upaya/`\n\nZig is a fast moving target right now and Upaya uses some of the newer features in the language. You will want to be using a [nightly build](https://ziglang.org/download/) of Zig rather than an older release. Once you have zig installed, you can use `zig build help`. The available examples will be listed in the `Steps` section. `zig build run` will always build the most recent example.\n\n## Your First Upaya App\nA full basic Upaya app is below. You can start putting code right in the `update` method which will be called each frame.\n```zig\nconst upaya = @import(\"upaya\");\nusingnamespace upaya.imgui;\n\npub fn main() !void {\n    upaya.run(.{\n        .init = init,\n        .update = update,\n    });\n}\n\nfn init() void {}\n\nfn update() void {\n    _ = igBegin(\"My First Window\", null, ImGuiWindowFlags_None);\n    igEnd();\n}\n```\n\n## Building a Command Line App\nParts of Upaya can be used for command line tools as well. For example you may want to build a command line image manipulator that uses the STB Image and STB Image Write libs included in Upaya. To do that, the Upaya `build.zig` file has a separate method that you can use to setup the dependencies for you executable: `linkCommandLineArtifact`. When you call `linkCommandLineArtifact` it will skip linking Sokol, Dear ImGui and Tiny Filebrowser giving you a stripped down binary. Note that you must manually initialize the temp allocator by calling `upaya.mem.initTmpAllocator();` See the \"texture_packer_cli\" example code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprime31%2Fzig-upaya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprime31%2Fzig-upaya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprime31%2Fzig-upaya/lists"}