{"id":18427159,"url":"https://github.com/fjebaker/zig-imgui-implot","last_synced_at":"2025-04-13T19:38:51.486Z","repository":{"id":241545505,"uuid":"806972469","full_name":"fjebaker/zig-imgui-implot","owner":"fjebaker","description":"Zig bindings to ImGui and Implot.","archived":false,"fork":false,"pushed_at":"2024-05-28T23:23:37.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T01:06:59.214Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fjebaker.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}},"created_at":"2024-05-28T08:49:39.000Z","updated_at":"2024-11-19T00:29:30.000Z","dependencies_parsed_at":"2024-05-29T01:43:15.375Z","dependency_job_id":null,"html_url":"https://github.com/fjebaker/zig-imgui-implot","commit_stats":null,"previous_names":["fjebaker/zig-imgui-implot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzig-imgui-implot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzig-imgui-implot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzig-imgui-implot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjebaker%2Fzig-imgui-implot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjebaker","download_url":"https://codeload.github.com/fjebaker/zig-imgui-implot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248769461,"owners_count":21158815,"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-11-06T05:09:49.362Z","updated_at":"2025-04-13T19:38:51.461Z","avatar_url":"https://github.com/fjebaker.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImGui and ImPlot bindings for Zig and Mach\n\nThis project provides bindings to ImGui (with docking) and ImPlot to Zig with a Mach backend. This packages also exposes a utility function to make ImGui use a Zig allocator.\n\n- [Dear Imgui](https://github.com/ocornut/imgui), and the [cimgui bindings](https://github.com/cimgui/cimgui) used.\n- [ImPlot](https://github.com/epezent/implot), and the [cimplot bindings](https://github.com/cimgui/cimplot) used.\n- [Mach](https://machengine.org/), with the ImGui mach backend modified from [foxnne/zig-imgui](https://github.com/foxnne/zig-imgui).\n\nThis project directly exposes the `cimgui` and `cimplot` C API to the user. By using these it is easier for the wrapper to keep up to date with the latest versions of both ImGui and ImPlot.\n\n```zig\nconst imgui = @import(\"zig-imgui\");\n\n// ...\n_ = imgui.igCreateContext(null);\n_ = imgui.ImPlot_CreateContext();\n// ...\n```\n\n## Example\n\nSee the [project template](https://github.com/fjebaker/zig-imgui-implot-template) as an example.\n\n## Using in a project\n\n- **Requires 0.12.0-dev.3180+83e578a18**\n\nUse the Zig package manager to fetch this dependency. Ideally use a specific commit hash, but for illustration we take the main branch:\n\n```bash\nzig fetch --save=zigimgui https://github.com/fjebaker/zig-imgui-implot/archive/main.tar.gz\n```\n\nThen, in your `build.zig`:\n\n```zig\n// Get the mach core dependency\nconst mach_dep = b.dependency(\"mach\", .{\n    .target = target,\n    .optimize = optimize,\n    // Since we're only using @import(\"mach\").core, we can specify this to avoid\n    // pulling in unneccessary dependencies.\n    .core = true,\n});\n\n// Get this dependency\nconst zig_imgui_dep = b.dependency(\n    \"zigimgui\",\n    .{ .target = target, .optimize = optimize },\n);\n\nconst imgui_module = zig_imgui_dep.module(\"zig-imgui\");\n// Need to give the same mach module to the bindings\nimgui_module.addImport(\"mach\", mach_dep.module(\"mach\"));\n\n// Add to your app\nconst app = try mach.CoreApp.init(b, mach_dep.builder, .{\n    .name = \"zfv\",\n    .src = \"src/main.zig\",\n    .target = target,\n    .optimize = optimize,\n    .mach_mod = mach_dep.module(\"mach\"),\n    .deps = \u0026.{\n        // Here is the important line\n        .{ .name = \"zig-imgui\", .module = imgui_module },\n    },\n});\n```\n\nIf you **do not want to use the mach backend** you can also access the static libraries for ImGui and ImPlot with\n```zig\nconst imgui_lib = zig_imgui_dep.artifact(\"imgui\");\nconst implot_lib = zig_imgui_dep.artifact(\"implot\");\nconst include_path = zig_imgui_dep.path(\"src\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fzig-imgui-implot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjebaker%2Fzig-imgui-implot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjebaker%2Fzig-imgui-implot/lists"}