{"id":15032005,"url":"https://github.com/rust-xed/xed-sys","last_synced_at":"2025-04-09T09:07:57.626Z","repository":{"id":34995583,"uuid":"157463269","full_name":"rust-xed/xed-sys","owner":"rust-xed","description":"Rust FFI bindings for Intel XED","archived":false,"fork":false,"pushed_at":"2024-12-20T18:38:10.000Z","size":498,"stargazers_count":21,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T02:24:55.160Z","etag":null,"topics":["decoder","encoder","encoder-decoder","intel","intel-xed","rust","rust-ffi","rust-ffi-bindings","rust-lang","rust-language","x86","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-xed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-11-13T23:55:59.000Z","updated_at":"2025-02-01T18:55:56.000Z","dependencies_parsed_at":"2023-01-15T11:41:35.792Z","dependency_job_id":"755c9d35-9ff1-4d37-8e85-f47968b26b6a","html_url":"https://github.com/rust-xed/xed-sys","commit_stats":{"total_commits":90,"total_committers":9,"mean_commits":10.0,"dds":0.5333333333333333,"last_synced_commit":"a425c75467e1f4c0ef7311c988474c61d7e9e293"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-xed%2Fxed-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-xed%2Fxed-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-xed%2Fxed-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-xed%2Fxed-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-xed","download_url":"https://codeload.github.com/rust-xed/xed-sys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"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":["decoder","encoder","encoder-decoder","intel","intel-xed","rust","rust-ffi","rust-ffi-bindings","rust-lang","rust-language","x86","x86-64"],"created_at":"2024-09-24T20:17:07.566Z","updated_at":"2025-04-09T09:07:57.609Z","avatar_url":"https://github.com/rust-xed.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/rust-xed/xed-sys/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/rust-xed/xed-sys/actions/workflows/build-and-test.yml)\n[![docs.rs](https://img.shields.io/docsrs/xed-sys)](https://docs.rs/xed-sys)\n[![crates.io](https://img.shields.io/crates/v/xed-sys.svg)](https://crates.io/crates/xed-sys)\n\n# xed-sys\nRust FFI bindings for [Intel XED](https://intelxed.github.io/).\n\n```rust\n/// Similar to `examples/xed-min.c` from official Intel XED repository.\nuse xed_sys::*;\n\nfn main() {\n    unsafe {\n        let (mmode, stack_addr_width) = (XED_MACHINE_MODE_LEGACY_32, XED_ADDRESS_WIDTH_32b);\n\n        xed_tables_init();\n\n        let itext: [u8; 15] = [\n            0xf, 0x85, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n        ];\n\n        for bytes in 0..16 {\n            let mut xedd = ::std::mem::MaybeUninit::\u003cxed_decoded_inst_t\u003e::uninit();\n            xed_decoded_inst_zero(xedd.as_mut_ptr());\n            xed_decoded_inst_set_mode(xedd.as_mut_ptr(), mmode, stack_addr_width);\n\n            let xed_error: xed_error_enum_t = xed_decode(xedd.as_mut_ptr(), itext.as_ptr(), bytes);\n            let desc = std::ffi::CStr::from_ptr(xed_error_enum_t2str(xed_error)).to_string_lossy();\n            println!(\"bytes={} error={}\", bytes, desc);\n        }\n    }\n}\n```\n\n## Building\n\nIn order to build this crate, you need:\n* Python version 3.8 or later ([to build XED](https://intelxed.github.io/build-manual/)).\n* A C compiler.\n\nIf you have the `bindgen` feature enabled then you will also need:\n* clang [to run bindgen](https://rust-lang.github.io/rust-bindgen/requirements.html#requirements).\n\n## Examples\nYou can find usage examples in the examples/ directory.\n\nThese examples are meant to be executed with cargo.  For instance, to run the example named `xed_min`:\n\n```\n# cd to the crate's root directory\ncargo run --example xed_min\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-xed%2Fxed-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-xed%2Fxed-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-xed%2Fxed-sys/lists"}