{"id":16009703,"url":"https://github.com/radareorg/radare2-bindings","last_synced_at":"2026-01-16T04:46:24.807Z","repository":{"id":12653136,"uuid":"15324802","full_name":"radareorg/radare2-bindings","owner":"radareorg","description":"Bindings of the r2 api for Valabind and friends","archived":false,"fork":false,"pushed_at":"2024-09-03T21:35:55.000Z","size":7527,"stargazers_count":135,"open_issues_count":13,"forks_count":93,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-01-13T22:06:55.124Z","etag":null,"topics":["c","java","lua","perl","python","radare2","swig","vala"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/radareorg.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":null,"patreon":null,"open_collective":"radareorg","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2013-12-19T22:49:47.000Z","updated_at":"2025-09-30T03:49:07.000Z","dependencies_parsed_at":"2024-11-05T22:02:27.550Z","dependency_job_id":"6edd40e9-51cb-4844-9a31-8718b4697f00","html_url":"https://github.com/radareorg/radare2-bindings","commit_stats":{"total_commits":1004,"total_committers":81,"mean_commits":"12.395061728395062","dds":"0.30079681274900394","last_synced_commit":"908ee3400f22ea99cb9b5f92b6f6fb227eecc2c3"},"previous_names":["radare/radare2-bindings"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/radareorg/radare2-bindings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fradare2-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fradare2-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fradare2-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fradare2-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radareorg","download_url":"https://codeload.github.com/radareorg/radare2-bindings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fradare2-bindings/sbom","scorecard":{"id":757557,"data":{"date":"2025-08-11","repo":{"name":"github.com/radareorg/radare2-bindings","commit":"908ee3400f22ea99cb9b5f92b6f6fb227eecc2c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: python/test/esil-step/a.out:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:16","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:17","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/generate_bindings.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:179: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:185: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:123: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:133: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:141: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate_bindings.yml:170: update your workflow using https://app.stepsecurity.io/secureworkflow/radareorg/radare2-bindings/generate_bindings.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:38","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:47","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:101","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:109","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:153","Warn: pipCommand not pinned by hash: .github/workflows/generate_bindings.yml:169","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T22:11:31.392Z","repository_id":12653136,"created_at":"2025-08-22T22:11:31.392Z","updated_at":"2025-08-22T22:11:31.392Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","java","lua","perl","python","radare2","swig","vala"],"created_at":"2024-10-08T13:03:43.059Z","updated_at":"2026-01-16T04:46:24.788Z","avatar_url":"https://github.com/radareorg.png","language":"Python","funding_links":["https://opencollective.com/radareorg"],"categories":[],"sub_categories":[],"readme":"# radare2 API bindings\n\n* pip install r2libr [![Python r2libr bindings 🚀](https://github.com/radareorg/radare2-bindings/actions/workflows/generate_bindings.yml/badge.svg)](https://github.com/radareorg/radare2-bindings/actions/workflows/generate_bindings.yml)\n* Vala / Swig CI [![vala swig ci🚀](https://github.com/radareorg/radare2-bindings/actions/workflows/ci.yml/badge.svg)](https://github.com/radareorg/radare2-bindings/actions/workflows/ci.yml)\n\nThis repository contains the native bindings generated with Valabind to use the radare2 APIs.\n\nIf you are looking for the `r2pipe` bindings, check this [repository](https://github.com/radare/radare2-r2pipe).\n\n## Description\n\nThis directory contains the code necessary to use the r2 api from your favourite language.\n\nSupported target languages:\n\n* Python\n  * [python-swig](python)\n  * [r2libr](r2libr)\n  * [ctypes](ctypes)\n  * `genbind.py -o /tmp/r2bindings-output -l python`\n* JavaScript\n  * [node-ffi](node-ffi)\n  * [node-swig](node-swig)\n* Java\n  * [jna](jna) Pure Java for FFI\n  * [java](java) JNI native bindings\n* Go\n* Ruby\n* Perl\n* Lua\n* Vala\n* Rust\n  * `genbind.py -o /tmp/r2bindings-output -l rust `\n* NewLisp\n* Guile\n* OCaml\n\nAnd some other experimental bindings are for:\n\n* GIR\n* C++\n* C#\n\nThis package also contains the vdoc/ subdirectory which contains the\nrules used to generate all [interactive html documentation](https://radare.org/vdoc).\n\n## Dependencies\n\nTo build radare2-bindings from repository you need the following programs installed:\n\n  * swig: enables support for python, perl, lua, java and many other\n  * vala: if you want to have Vala or Genie bindings\n  * valabind: required only in developer mode (not release tarball)\n\nRelease tarballs come with all the pregenerated `.cxx` files, so you have\nno extra dependencies apart from the language libraries and C++ compiler.\n\n### Using r2pm\n\nFortunely, all those dependencies can be installed with r2pm:\n```sh\nr2pm -cgi vala swig valabind\n```\n\n### Source build\n\nTo get install all dependencies do the following steps in order:\n\n  * Install vala and swig from your distro\n\n```sh\narch$ sudo pacman -S swig valac\ndeb$ sudo apt install -y swig valac\nmac$ brew install swig valac\n```\n\nOr install\n\n  * Install [latest release](https://live.gnome.org/Vala) of Vala from tarball or git\n  * Fetch valabind from the repository:\n\n```sh\n$ git clone https://github.com/radare/valabind\n$ cd valabind\n$ make\n$ sudo make install PREFIX=/usr\n```\n\n## radare2-bindings\n\nIf you compile from the repo you need the latest version of valabind and then:\n```\n./configure --prefix=/usr\n```\n\nYou can select the languages you want to compile with `--enable={list-of-langs}`\n```\n./configure --prefix=/usr --enable=python\nmake\n```\n\n## r2libr (python)\n\nr2libr are the most complete **python bindings** generated from source with all `libr` dynamic libraries bundled in a wheel.\n\nYou may have a try without the need to install radare2:\n\n```bash\npip3 install --upgrade r2libr\n```\n\nFor details, see [r2libr](https://github.com/radareorg/radare2-bindings/tree/master/r2libr).\n\n## Experimental radare2 bindgen\n\n### Introduction\n\nThis script allows to generate native bindings for these languages directly from radare2 C headers:\n\n - Python (uses [ctypeslib2](https://github.com/trolldbois/ctypeslib))\n - Rust (uses [rust-bindgen](https://github.com/rust-lang-nursery/rust-bindgen))\n - Go (uses [c-for-go](https://github.com/xlab/c-for-go))\n - Haskell (uses [c2hs](https://github.com/haskell/c2hs))\n\nMore languages are planned, in particular:\n\n - Ruby - I wanted to use [ffi-gen](https://github.com/neelance/ffi_gen) but it needs revival and update to the modern Ruby and Clang.\n - OCaml - needs to be written\n - Lua - maybe [LuaAutoC](https://github.com/orangeduck/LuaAutoC) can be used, I don't know.\n\n### Usage\n\n```sh\ngenbind.py -o /tmp/r2bindings-output\n```\n\nThe tool required `radare2` to be installed and takes the include directory from the output of `r2 -H`\nIt is possible also specify the particular languages, for example:\n```sh\ngenbind.py -o /tmp/r2bindings-output -l go rust python\n```\n\n## PYTHON\n\nTo select the version of python to compile for use the PYTHON_CONFIG\nenvironment variable as follows:\n```sh\n$ ./configure --prefix=/usr --enable-devel\n$ cd python\n$ PYTHON_CONFIG=python3.2-config make\n$ su -\n# PYTHON_CONFIG=python3.2-config make install\n```\n\n## RANDOM NOTES\n\nThe valabind integration forces us to do some changes in the r2 API.\n\nThese api changes are for:\n\n  - Avoid keywords in function names\n\n    Every language has its own keywords, r2api should try to workaround\n    all those keywords to avoid collisions for bindings.\n\n    Example: `use`, `del`, `from`, `continue`, etc..\n\n    TODO: we need to review APIs, find better names for functions using\n    those keywords, etc..\n\n  - Review basic data structures\n\n    Linked lists, hash tables, r_db, arrays, ... must be reviewed to\n    fit with vala and swig basics to be able to use them with simple\n    APIs or integrate them with the syntax sugar of the target language.\n\n    Example:\n\n```vala\n  foreach (var foo in binls.get_symbols ()) {\n\tprint (\"%s 0x%08\"PFMT64x\"\\n\", foo.name, foo.offset);\n  }\n```\n\n  - Unit testing\n\n    Having bindings for python, perl, ruby, .. is good for unit testing\n    because it hardly simplifies the way to test APIs, find bugs, ...\n\n    TODO: write unit testing frameworks for perl, ruby, python, etc..\n\n  - API unification for all languages\n\n    All the previous development points are meant to reduce code in r2,\n    avoid syntax exceptions, simplify api usage, and much moar ;)\n\nSWIG is not complete, there are still so many bugs to fix and so many\nunimplemented stuff. Here's a list of the most anoying things of it:\n\n  - `unsigned char *` : not implemented\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradareorg%2Fradare2-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradareorg%2Fradare2-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradareorg%2Fradare2-bindings/lists"}