{"id":13440154,"url":"https://github.com/unicorn-rs/unicorn-rs","last_synced_at":"2025-12-12T13:04:16.309Z","repository":{"id":57634856,"uuid":"55469966","full_name":"unicorn-rs/unicorn-rs","owner":"unicorn-rs","description":"Rust bindings for the unicorn CPU emulator","archived":true,"fork":false,"pushed_at":"2020-10-06T18:58:32.000Z","size":372,"stargazers_count":144,"open_issues_count":3,"forks_count":31,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-12-01T17:52:09.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unicorn-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-05T05:24:03.000Z","updated_at":"2025-07-18T15:37:21.000Z","dependencies_parsed_at":"2022-09-10T13:50:53.049Z","dependency_job_id":null,"html_url":"https://github.com/unicorn-rs/unicorn-rs","commit_stats":null,"previous_names":["ekse/unicorn-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unicorn-rs/unicorn-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicorn-rs%2Funicorn-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicorn-rs%2Funicorn-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicorn-rs%2Funicorn-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicorn-rs%2Funicorn-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicorn-rs","download_url":"https://codeload.github.com/unicorn-rs/unicorn-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicorn-rs%2Funicorn-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27678417,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-31T03:01:20.261Z","updated_at":"2025-12-12T13:04:16.296Z","avatar_url":"https://github.com/unicorn-rs.png","language":"Rust","funding_links":[],"categories":["Libraries","Vulnerability Assessment","库 Libraries"],"sub_categories":["Virtualization","Binary Analysis \u0026 Reversing","虚拟化 Virtualization"],"readme":"# unicorn-rs\n\n**THIS PACKAGE IS DEPRECATED AND NO LONGER MAINTAINED.**\n\nRust bindings are now included with unicorn and will be maintained there from now on.\n\nhttps://github.com/unicorn-engine/unicorn/tree/next/bindings/rust\n\n\n## Summary \n\n[![Cargo](https://img.shields.io/crates/v/unicorn.svg)](https://crates.io/crates/unicorn)\n[![Documentation](https://docs.rs/unicorn/badge.svg)](https://docs.rs/unicorn)\n[![Build Status](https://api.travis-ci.org/ekse/unicorn-rs.svg?branch=master)](https://travis-ci.org/ekse/unicorn-rs)\n\nRust bindings for the [unicorn](http://www.unicorn-engine.org/) CPU emulator.\n\n\n\n```rust\nuse unicorn::{Cpu, CpuX86};\n\nfn main() {\n    let x86_code32: Vec\u003cu8\u003e = vec![0x41, 0x4a]; // INC ecx; DEC edx\n\n    let emu = CpuX86::new(unicorn::Mode::MODE_32).expect(\"failed to instantiate emulator\");\n    let _ = emu.mem_map(0x1000, 0x4000, unicorn::Protection::ALL);\n    let _ = emu.mem_write(0x1000, \u0026x86_code32);\n    let _ = emu.reg_write_i32(unicorn::RegisterX86::ECX, -10);\n    let _ = emu.reg_write_i32(unicorn::RegisterX86::EDX, -50);\n\n    let _ = emu.emu_start(0x1000, (0x1000 + x86_code32.len()) as u64, 10 * unicorn::SECOND_SCALE, 1000);\n    assert_eq!(emu.reg_read_i32(unicorn::RegisterX86::ECX), Ok(-9));\n    assert_eq!(emu.reg_read_i32(unicorn::RegisterX86::EDX), Ok(-51));\n}\n```\n\n## Installation\n\nThis project has been tested on Linux, OS X and Windows. The bindings are built for version 1.0 of\nunicorn.\n\nThis package attempts to build unicorn if it is not already installed on the system. To build\nunicorn on Linux and OS X, the following tools are needed : gcc, make, git, python 2.7. Visual\nStudio is needed on Windows.\n\nTo use unicorn-rs, simply add it as dependency to the Cargo.toml of your program.\n\n```\n[dependencies]\nunicorn = \"0.8.0\"\n```\n\n## Changelog\n\n### 0.9\n\nError now implements the Error trait (thanks to @tathanhdinh), the RESOURCE and EXCEPTION\nerror cases are now supported (thanks to @endeav0r). The CPU context can now be\nsaved and restored (thanks to @oblivia-simplex). You can find an example use in the\ntest `x86_context_save_and_restore`, in tests/unicorn.rs. The ffi bindings crate \nunicorn-sys is now no_std by default (thanks to @strake). Finally the crate was migrated\nto Rust edition 2018.\n\nThank you again to all the contributors, your help is always appreciated.\n\n### 0.8.0\n\nAdded support for `mem_map_ptr`.\n\n### 0.7.0\n\nWindows is now supported (thanks to kichristensen).\n\n### 0.6.0\n\nWe now check if unicorn is installed on the system via pkg-tool and use that version if available.\nOtherwise unicorn is compiled when building the package.\n\n### 0.4.0\n\nunicorn is now compiled as part of the build process of unicorn-rs.\n\n### 0.3.0\n\nThe handling of callbacks has been modified, callbacks should be implemented using closures. See\nthe tests for examples.\n\n- added support for interrupt, in/out and sysenter callbacks\n\n\n## Contributing\n\nContributions to this project are super appreciated. Pull requests, bug reports, code review, tests,\ndocumentation or feedback on your use of the bindings, nothing is too small. Don't hesitate to open\nan issue if you have questions.\n\nContributors:\n\n- Sébastien Duquette (@ekse)\n- Israel Hallé (@isra17) for redesigning the callbacks API\n- Richo Healey (@richo)\n- Kim Christensen (@kichristensen) for the Windows support\n- petevine for reviewing the project and adding tests\n- jschievink for his help with the API design\n- m4b for the build.rs script\n- TA Thanh Dinh\n- Lucca Fraser (@oblivia-simplex)\n- Matthew Farkas-Dyck (@strake)\n- endeav0r \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicorn-rs%2Funicorn-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicorn-rs%2Funicorn-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicorn-rs%2Funicorn-rs/lists"}