{"id":26659215,"url":"https://github.com/zig-sec/capstone-bindings-zig","last_synced_at":"2025-10-29T02:48:35.609Z","repository":{"id":243147821,"uuid":"811607587","full_name":"Zig-Sec/capstone-bindings-zig","owner":"Zig-Sec","description":"Zig language bindings for the Capstone Framework","archived":false,"fork":false,"pushed_at":"2025-06-01T09:32:52.000Z","size":93,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-25T01:04:17.872Z","etag":null,"topics":["capstone","language-bindings"],"latest_commit_sha":null,"homepage":"","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/Zig-Sec.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-06-07T00:00:03.000Z","updated_at":"2025-06-23T22:14:43.000Z","dependencies_parsed_at":"2024-06-15T00:21:42.249Z","dependency_job_id":"dec24a2f-d287-4ce5-844d-129fb811f760","html_url":"https://github.com/Zig-Sec/capstone-bindings-zig","commit_stats":null,"previous_names":["soratenshi/capstone-bindings-zig","zig-sec/capstone-bindings-zig"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Zig-Sec/capstone-bindings-zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zig-Sec%2Fcapstone-bindings-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zig-Sec%2Fcapstone-bindings-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zig-Sec%2Fcapstone-bindings-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zig-Sec%2Fcapstone-bindings-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zig-Sec","download_url":"https://codeload.github.com/Zig-Sec/capstone-bindings-zig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zig-Sec%2Fcapstone-bindings-zig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261783374,"owners_count":23208948,"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":["capstone","language-bindings"],"created_at":"2025-03-25T10:18:46.242Z","updated_at":"2025-10-29T02:48:34.962Z","avatar_url":"https://github.com/Zig-Sec.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capstone-bindings-zig\n\n## Introduction\nCapstone natively works with Zig because of `translate-c`, but i always find it more pleasent to use\nZig's features whenever i write anything, so i decided to create those bindings.\n\n## Example\nSimple example, i believe i snatched it from some of the tests in capstone itself.\n\n## Remarks\n\u003e [!WARNING]\n\u003e The bindings should fully work, however they are not battle-tested yet.\n\u003e If you encounter any Issues / Bugs / API Concerns, please open an Issue.\n\n## Future plans\nThe API is probably not 100% as i want it yet, so changes are to be expected, and that's where especially you,\nthe user comes into play. If you have ideas on how to improve the API design, don't shy away from creating an\nissue.\n\n## Example\n```zig\nconst std = @import(\"std\");\nconst cs = @import(\"capstone-z\");\n\nconst CODE = \"\\x55\\x48\\x8b\\x05\\xb8\\x13\\x00\\x00\\xe9\\xea\\xbe\\xad\\xde\\xff\\x25\\x23\\x01\\x00\\x00\\xe8\\xdf\\xbe\\xad\\xde\\x74\\xff\";\n\npub fn main() !void {\n    var handle = try cs.ManagedHandle.init(cs.Arch.X86, cs.Mode.@\"64\", .{\n        .syntax = .INTEL,\n        .detail = true,\n        .mnemonic = \u0026.{.{ .id = cs.c.X86_INS_JMP, .mnemonic = \"our_jmp\" }},\n    });\n    defer handle.deinit();\n\n    var iter = handle.disasmIter(CODE, 0x1000);\n    var index: usize = 0;\n    while (iter.next()) |insn| : (index += 1) {\n        std.debug.print(\"{d}: 0x{x}\\t{s}\\t{s}\\n\", .{ index, insn.address, insn.mnemonic, insn.op_str });\n    }\n}\n```\n\nthat gives the following output:\n```\n0: 0x1000       push    rbp\n1: 0x1001       mov     rax, qword ptr [rip + 0x13b8]\n2: 0x1008       our_jmp 0xffffffffdeadcef7\n3: 0x100d       our_jmp qword ptr [rip + 0x123]\n4: 0x1013       call    0xffffffffdeadcef7\n5: 0x1018       je      0x1019\n```\n\n## License\nI am not an expert on licenses, but from my understanding bindings can have a different license.\nSo if you're using it in your project, make sure to actually verify that it is compatible with the\nactual [capstone license](https://github.com/capstone-engine/capstone#License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-sec%2Fcapstone-bindings-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzig-sec%2Fcapstone-bindings-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-sec%2Fcapstone-bindings-zig/lists"}