{"id":19407631,"url":"https://github.com/zyantific/zydis-rs","last_synced_at":"2025-04-04T14:05:34.993Z","repository":{"id":45522523,"uuid":"101184401","full_name":"zyantific/zydis-rs","owner":"zyantific","description":"Zydis Rust Bindings","archived":false,"fork":false,"pushed_at":"2024-06-09T18:00:03.000Z","size":397,"stargazers_count":88,"open_issues_count":2,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T13:05:10.235Z","etag":null,"topics":["bindings","disassembler","ffi","rust","zydis"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/zyantific.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":"2017-08-23T13:40:07.000Z","updated_at":"2025-03-12T05:42:59.000Z","dependencies_parsed_at":"2023-10-25T00:29:36.694Z","dependency_job_id":"675a2ae6-8047-4ce7-9042-4aa672a684fa","html_url":"https://github.com/zyantific/zydis-rs","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyantific%2Fzydis-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyantific%2Fzydis-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyantific%2Fzydis-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyantific%2Fzydis-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyantific","download_url":"https://codeload.github.com/zyantific/zydis-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247186079,"owners_count":20898091,"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","disassembler","ffi","rust","zydis"],"created_at":"2024-11-10T12:03:17.227Z","updated_at":"2025-04-04T14:05:34.969Z","avatar_url":"https://github.com/zyantific.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"Zydis Rust Bindings\n===================\n\n[![Crates.io][crates-badge]][crates-url]\n[![docs.rs][docs-badge]][docs-url]\n[![MIT licensed][mit-badge]][mit-url]\n\nRust bindings for [Zydis][zydis], a fast and lightweight x86/x86-64 \ndisassembler and code generator library.\n\n[crates-badge]: https://img.shields.io/crates/v/zydis.svg\n[crates-url]: https://crates.io/crates/zydis\n[docs-badge]: https://docs.rs/zydis/badge.svg\n[docs-url]: https://docs.rs/zydis/\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[mit-url]: https://github.com/zyantific/zydis-rs/blob/master/LICENSE\n[zydis]: https://github.com/zyantific/zydis\n\n```toml\n[dependencies]\nzydis = \"4.1.1\"\n```\n\n## Example\n```rust\nuse zydis::*;\n\n#[rustfmt::skip]\nstatic CODE: \u0026'static [u8] = \u0026[\n    0x51, 0x8D, 0x45, 0xFF, 0x50, 0xFF, 0x75, 0x0C, 0xFF, 0x75, 0x08,\n    0xFF, 0x15, 0xA0, 0xA5, 0x48, 0x76, 0x85, 0xC0, 0x0F, 0x88, 0xFC,\n    0xDA, 0x02, 0x00,\n];\n\nfn main() -\u003e zydis::Result {\n    let fmt = Formatter::intel();\n    let dec = Decoder::new64();\n\n    // 0 is the address for our code.\n    for insn_info in dec.decode_all::\u003cVisibleOperands\u003e(CODE, 0) {\n        let (ip, _raw_bytes, insn) = insn_info?;\n        \n        // We use Some(ip) here since we want absolute addressing based on the given\n        // instruction pointer. If we wanted relative addressing, we'd use `None` instead.\n        println!(\"0x{:016X} {}\", ip, fmt.format(Some(ip), \u0026insn)?);\n    }\n\n    Ok(())\n}\n```\n\n### Output\n\n```text\n0x0000000000000000 push rcx\n0x0000000000000001 lea eax, [rbp-0x01]\n0x0000000000000004 push rax\n0x0000000000000005 push [rbp+0x0C]\n0x0000000000000008 push [rbp+0x08]\n0x000000000000000B call [0x000000007648A5B1]\n0x0000000000000011 test eax, eax\n0x0000000000000013 js 0x000000000002DB15\n```\n\n## Version Map\n\nSince version 3.0.0 the binding's major and minor versions are tethered to the Zydis version. The binding's patch \nversion is independent of the Zydis version and can be bumped for binding-only changes. Every cargo crate release\nhas a corresponding git tag.\n\n\u003cdetails\u003e\n  \u003csummary\u003eVersion map for older releases\u003c/summary\u003e\n\n| Bindings | Zydis                                                                                                      |\n|----------|------------------------------------------------------------------------------------------------------------|\n| v0.0.4   | [v2.0.2](https://github.com/zyantific/zydis/tree/v2.0.2)                                                   |\n| v0.0.3   | [v2.0.0-develop@e967510](https://github.com/zyantific/zydis/tree/e967510fb251cf39a3556942b58218a9dcac5554) |\n| v0.0.2   | [v2.0.0-alpha2](https://github.com/zyantific/zydis/tree/v2.0.0-alpha2)                                     |\n| v0.0.1   | [v2.0.0-develop@4a79d57](https://github.com/zyantific/zydis/tree/4a79d5762ea7f15a5961733cc6d3a7704d3d5206) |\n\n\u003c/details\u003e\n\n\u003c!-- for some reason this comment is required to not break MD parsing in rustdoc --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyantific%2Fzydis-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyantific%2Fzydis-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyantific%2Fzydis-rs/lists"}