{"id":13578697,"url":"https://github.com/rizinorg/rz-ghidra","last_synced_at":"2025-05-16T12:06:19.559Z","repository":{"id":39333831,"uuid":"196547485","full_name":"rizinorg/rz-ghidra","owner":"rizinorg","description":"Deep ghidra decompiler and sleigh disassembler integration for rizin","archived":false,"fork":false,"pushed_at":"2024-06-10T16:51:16.000Z","size":924,"stargazers_count":802,"open_issues_count":51,"forks_count":87,"subscribers_count":26,"default_branch":"dev","last_synced_at":"2024-07-11T13:57:26.453Z","etag":null,"topics":["decompiler","disassembler","ghidra","hacktoberfest","reverse-engineering","rizin","sleigh"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rizinorg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rizinorg"}},"created_at":"2019-07-12T09:11:13.000Z","updated_at":"2024-07-11T13:57:34.063Z","dependencies_parsed_at":"2023-09-24T03:47:37.203Z","dependency_job_id":"e936f59c-888a-43d4-9119-6c44597a6cd5","html_url":"https://github.com/rizinorg/rz-ghidra","commit_stats":{"total_commits":347,"total_committers":28,"mean_commits":"12.392857142857142","dds":0.3285302593659942,"last_synced_commit":"48fe3815a0434dadb35cc27032b6126a85c96c09"},"previous_names":["radareorg/r2ghidra-dec"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizinorg%2Frz-ghidra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizinorg%2Frz-ghidra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizinorg%2Frz-ghidra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizinorg%2Frz-ghidra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizinorg","download_url":"https://codeload.github.com/rizinorg/rz-ghidra/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399793,"owners_count":20770908,"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":["decompiler","disassembler","ghidra","hacktoberfest","reverse-engineering","rizin","sleigh"],"created_at":"2024-08-01T15:01:32.973Z","updated_at":"2025-04-02T05:06:42.882Z","avatar_url":"https://github.com/rizinorg.png","language":"C++","funding_links":["https://github.com/sponsors/rizinorg"],"categories":["\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","C++"],"sub_categories":[],"readme":"\u003cimg width=\"150\" height=\"150\" align=\"left\" style=\"float: left; margin: 0 10px 0 0;\" alt=\"rz-ghidra logo\" src=\"https://raw.githubusercontent.com/rizinorg/rz-ghidra/master/assets/logo.svg\"\u003e\n\n# rz-ghidra\n\n\u003c!--[![Build Status](https://travis-ci.com/rizinorg/rz-ghidra-dec.svg?token=JDmXp2pDhXxtPErySVHM\u0026branch=master)](https://travis-ci.com/rizinorg/rz-ghidra)--\u003e\n\nThis is an integration of the Ghidra decompiler and Sleigh Disassembler for [Rizin](https://github.com/rizinorg/rizin).\nIt is solely based on the decompiler part of Ghidra, which is written entirely in\nC++, so Ghidra itself is not required at all and the plugin can be built self-contained.\nThis project was presented, initially for radare2, at r2con 2019 as part of the Cutter talk: [https://youtu.be/eHtMiezr7l8?t=950](https://youtu.be/eHtMiezr7l8?t=950)\n\n## Usage\n\n```\nUsage: pdg   # Native Ghidra decompiler plugin\n| pdg           # Decompile current function with the Ghidra decompiler\n| pdgd          # Dump the debug XML Dump\n| pdgx          # Dump the XML of the current decompiled function\n| pdgj          # Dump the current decompiled function as JSON\n| pdgo          # Decompile current function side by side with offsets\n| pdgs          # Display loaded Sleigh Languages\n| pdg*          # Decompiled code is returned to rizin as comment\n```\n\nThe following config vars (for the `e` command) can be used to adjust rz-ghidra's behavior:\n\n```\n    ghidra.cmt.cpp: C++ comment style\n ghidra.cmt.indent: Comment indent\n     ghidra.indent: Indent increment\n       ghidra.lang: Custom Sleigh ID to override auto-detection (e.g. x86:LE:32:default)\n    ghidra.linelen: Max line length\n   ghidra.nl.brace: Newline before opening '{'\n    ghidra.nl.else: Newline before else\n ghidra.sleighhome: SLEIGHHOME\n```\n\nHere, `ghidra.sleighhome` must point to a directory containing the `*.sla`, `*.lspec`, ... files for\nthe architectures that should supported by the decompiler. This is however set up automatically when using\nthe rz-pm package or installing as shown below.\n\n## Building\n\nFirst, make sure the submodule contained within this repository is fetched and up to date:\n\n```\ngit submodule init\ngit submodule update\n```\n\nThen, the Rizin plugin can be built and installed as follows:\n\n```\nmkdir build \u0026\u0026 cd build\ncmake -DCMAKE_INSTALL_PREFIX=~/.local ..\nmake\nmake install\n```\n\nHere, set the `CMAKE_INSTALL_PREFIX` to a location where Rizin can load the plugin from.\nThe install step is necessary for the plugin to work because it includes installing the necessary Sleigh files.\nIf you are using Rizin from git, also set `CMAKE_PREFIX_PATH` to the Rizin installation directory.\n\nTo also build the Cutter plugin, you must have Cutter installed from source under some prefix,\nwhich can be optionally specified with `-DCMAKE_PREFIX_PATH=\u003cpath\u003e`, then pass `-DBUILD_CUTTER_PLUGIN=ON` to cmake\nto enable the plugin:\n```\n/my/path/rz-ghidra\u003e mkdir build \u0026\u0026 cd build\n/my/path/rz-ghidra/build\u003e cmake -DBUILD_CUTTER_PLUGIN=ON -DCMAKE_PREFIX_PATH=/path/to/cutter/prefix -DCMAKE_INSTALL_PREFIX=~/.local ..\n/my/path/rz-ghidra/build\u003e make \u0026\u0026 make install\n```\nBy default, the Cutter plugin is installed in an automatically chosen path in the current user's home directory.\nThis path can be overriden with `-DCUTTER_INSTALL_PLUGDIR`.\n\n## Versioning and Rizin Compatibility\n\nRizin has a quickly evolving C API so it is necessary to be explicit about which versions\nof rz-ghidra are compatible with which versions of Rizin:\n\nWhen using Rizin and rz-ghidra from git:\n* rz-ghidra branch `dev` follows along Rizin branch `dev`.\n* rz-ghidra branch `stable` follows along Rizin branch `stable`.\n\nRegarding releases, rz-ghidra is generally released simultaneously with Rizin and\noften uses the same version numbers (but not guaranteed, do not depend on these numbers!).\nAlso, along with every Rizin release a tag like `rz-0.1.2` is created on rz-ghidra, which exactly\npoints to an rz-ghidra release and indicates that this release is compatible with the specified Rizin version.\nThese tags can be used by distribution maintainers to look up how to set up dependencies.\n\n## License\n\nPlease note that this plugin is available under the **LGPLv3**, which\nis more strict than Ghidra's license!\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizinorg%2Frz-ghidra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizinorg%2Frz-ghidra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizinorg%2Frz-ghidra/lists"}