13 Commits
Author SHA1 Message Date
dependabot[bot] 8b84bc13e7 Bump pypa/cibuildwheel from 4.3.4 to 4.3.5 (#137)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v4.3.4...v4.3.5)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 4.3.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-02 22:32:19 +08:00
Khairul Azhar Kasmiran 6a3641cb6d Add test for examples/2b-rz_bin_plugin.py (#136) 2026-10-31 10:51:55 +08:00
dependabot[bot] d74c39e6fa Bump pypa/cibuildwheel from 4.3.1 to 4.3.4 (#134)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 4.3.1 to 4.3.4.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v4.3.1...v4.3.4)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 4.3.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 18:56:47 +08:00
dependabot[bot] f36d5c4098 Bump pypa/gh-action-pypi-publish from 1.14.2 to 1.14.3 (#135)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.14.2 to 1.14.3.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.14.2...v1.14.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.14.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-26 18:54:50 +08:00
Khairul Azhar Kasmiran 9463be9616 Add test for examples/2a-rz_bin_plugin.py (#133)
* Run tests from inside `tests/`
* Add test for examples/2a-rz_bin_plugin.py
* Move tests to `db/`
* Add `.gitignore` to test dir
* Rename `tests/` dir to `test/`
2026-10-24 14:16:18 +08:00
dependabot[bot] ca552d44d3 Bump pypa/cibuildwheel from 4.2.0 to 4.3.1 (#132)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 4.2.0 to 4.3.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v4.2.0...v4.3.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 4.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-19 18:21:27 +08:00
Khairul Azhar Kasmiran 4d716bce6e py_install.py: Ensure install dir exists (#131) 2026-10-18 19:45:45 +08:00
dependabot[bot]andKhairul Azhar Kasmiran ac2381b166 Bump pypa/cibuildwheel from 3.4.1 to 4.2.0 (#126)
* Bump pypa/cibuildwheel from 3.4.1 to 4.2.0

Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 3.4.1 to 4.2.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v3.4.1...v4.2.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add `C:/rizin/bin` to Windows PATH

* Try using the Linux way for PATH

* Try the Windows way again

* Try combining both Windows and Linux ways

* Use forward slashes instead

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Khairul Azhar Kasmiran <[email protected]>
2026-10-15 00:18:16 +08:00
dependabot[bot] da60547435 Bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.2 (#125)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.14.0 to 1.14.2.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.14.0...v1.14.2)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 18:45:20 +08:00
dependabot[bot] 4518ff76ec Bump actions/checkout from 6 to 7 (#122)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-13 19:42:00 +08:00
Khairul Azhar Kasmiran 85e7952624 Check for cygwin also on Windows build (#130) 2026-10-12 22:40:27 +08:00
Rot127 4b73d4b138 Allow for const qualifiers in linter. (#129) 2026-10-11 16:57:56 +00:00
Rot127 862f712852 Add RzThreadRingBuf and RzThreadQueue to bindgen linter (#127)
* Add RzThreadRingBuf and RzThreadQueue to bindgen linter

* Add rb and queue source files to exception list.
2026-09-23 17:19:59 +00:00
14 changed files with 103 additions and 44 deletions

No files matched your search

+17 -11
View File
@@ -34,12 +34,12 @@ jobs:
run: brew install swig
- name: Checkout rz-bindgen
uses: actions/checkout@v6
uses: actions/checkout@v7
# runned only from workflow_call
- name: Checkout rizin
if: ${{ inputs.external_call }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
@@ -47,7 +47,7 @@ jobs:
- name: Checkout rizin (stable)
if: ${{ !inputs.external_call && ((github.ref_name == 'stable') || (github.base_ref == 'stable')) }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
@@ -55,14 +55,14 @@ jobs:
- name: Checkout rizin (dev)
if: ${{ !inputs.external_call && ((github.ref_name != 'stable') && (github.base_ref != 'stable')) }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
ref: dev
- name: Build rz-bindgen
uses: pypa/cibuildwheel@v3.4.1
uses: pypa/cibuildwheel@v4.3.5
- name: Upload sdist
uses: actions/upload-artifact@v7
@@ -81,14 +81,14 @@ jobs:
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
path: rz-bindgen
# runned only from workflow_call
- name: Checkout rizin
if: ${{ inputs.external_call }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
@@ -96,7 +96,7 @@ jobs:
- name: Checkout rizin (stable)
if: ${{ !inputs.external_call && ((github.ref_name == 'stable') || (github.base_ref == 'stable')) }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
@@ -104,7 +104,7 @@ jobs:
- name: Checkout rizin (dev)
if: ${{ !inputs.external_call && ((github.ref_name != 'stable') && (github.base_ref != 'stable')) }}
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: rizinorg/rizin
path: rizin
@@ -132,6 +132,12 @@ jobs:
- name: Test python lang plugin
run: rizin -qc "Ll" | grep "Python SWIG"
- name: Checkout our Testsuite Binaries
uses: actions/checkout@v7
with:
repository: rizinorg/rizin-testbins
path: rz-bindgen/test/bins
- name: Run rz-test
run: rz-test -L tests/
working-directory: rz-bindgen
run: rz-test -L db/examples
working-directory: rz-bindgen/test
+3 -3
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: REUSE compliance check
uses: fsfe/reuse-action@v6
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Install tools
run: |
pip install mypy pyflakes pylint black
@@ -46,7 +46,7 @@ jobs:
security-events: write
steps:
- name: Checkout rz-bindgen
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
+1 -1
View File
@@ -35,6 +35,6 @@ jobs:
name: sdist
path: dist
- name: Publish wheels
uses: pypa/[email protected].0
uses: pypa/[email protected].3
with:
password: ${{ secrets.PYPI_TOKEN }}
+7 -1
View File
@@ -46,7 +46,13 @@ SPDX-FileCopyrightText = "2022 wingdeans <[email protected]>"
SPDX-License-Identifier = "LGPL-3.0-only"
[[annotations]]
path = "tests/**"
path = "test/db/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 RizinOrg <[email protected]>"
SPDX-License-Identifier = "LGPL-3.0-only"
[[annotations]]
path = "test/.gitignore"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 RizinOrg <[email protected]>"
SPDX-License-Identifier = "LGPL-3.0-only"
+2 -2
View File
@@ -35,11 +35,11 @@ fi
pushd rizin
if [[ "$OSTYPE" =~ msys* ]]; then
if [[ "$OSTYPE" =~ msys|cygwin ]]; then
meson setup --buildtype=release --prefix='c:/rizin' --vsenv build
meson install -C build
else
if [[ "$OSTYPE" =~ linux* ]]; then
if [[ "$OSTYPE" == linux* ]]; then
export CFLAGS="-include linux/limits.h"
fi
meson setup --buildtype=release --libdir=lib build
+3 -3
View File
@@ -29,12 +29,12 @@ builder.enable_load_buffer = True
plugin = builder.build(CustomBinPlugin())
```
`RzBinPluginBuilder::build` returns an `RzBinPlugin` struct which has the enabled function pointers set to custom C functions which call into the currently active director. Enabling functions is done using variables on the builder which are named the same as their corresponding struct function pointer prefixed with `enable_`. To use the plugin, simply append the struct to `core.bin.plugins`.
`RzBinPluginBuilder::build` returns an `RzBinPlugin` struct which has the enabled function pointers set to custom C functions which call into the currently active director. Enabling functions is done using variables on the builder which are named the same as their corresponding struct function pointer prefixed with `enable_`. To use the plugin, simply add the plugin to `core.bin`.
```py
core = rizin.RzCore()
plugin.thisown = False
core.bin.plugins.append(plugin)
core.bin.plugin_add(plugin)
```
Now it is possible to see the `SWIGCustom` plugin when listing the binary plugins with `iL`:
@@ -72,7 +72,7 @@ plugin, plugin_struct = rizin.register_RzBinPlugin(CustomBinPlugin)
core = rizin.RzCore()
plugin_struct.thisown = False
core.bin.plugins.append(plugin_struct)
core.bin.plugin_add(plugin_struct)
# Run rizin and load binary
core.bin.force_plugin(plugin.name)
+1 -1
View File
@@ -30,7 +30,7 @@ builder.enable_load_buffer = True
plugin = builder.build(CustomBinPlugin())
core = rizin.RzCore()
core.bin.plugins.append(plugin)
core.bin.plugin_add(plugin)
# Run rizin and load binary
core.bin.force_plugin(plugin.name)
+1 -1
View File
@@ -21,7 +21,7 @@ plugin, plugin_struct = rizin.register_RzBinPlugin(CustomBinPlugin)
core = rizin.RzCore()
plugin_struct.thisown = False
core.bin.plugins.append(plugin_struct)
core.bin.plugin_add(plugin_struct)
# Run rizin and load binary
core.bin.force_plugin(plugin.name)
+1
View File
@@ -16,6 +16,7 @@ def install_files(scheme):
elif file.endswith(".so"):
dest_type = 'platlib'
install_dir = sysconfig.get_path(dest_type, scheme)
os.makedirs(install_dir, exist_ok=True)
shutil.copy(file, install_dir)
print(f"Installing {os.path.basename(file)} to {install_dir}")
+1 -1
View File
@@ -19,7 +19,7 @@ environment = { PATH="/opt/rh/llvm-toolset-7.0/root/usr/bin:/opt/rh/llvm-toolset
archs = ["x86_64"]
[tool.cibuildwheel.windows]
environment = { CMAKE_PREFIX_PATH="C:/rizin" }
environment = { CMAKE_PREFIX_PATH="C:/rizin", PATH="C:/rizin/bin;$PATH" }
archs = ["AMD64"]
[tool.cibuildwheel.macos]
+23 -5
View File
@@ -110,8 +110,25 @@ def cursor_get_annotations(cursor: Cursor) -> List[str]:
]
generic_types = {"RzList", "RzListIter", "RzPVector", "RzVector", "RzGraph", "HtPP"}
skip_files = {"ht_inc.c", "ht_inc.h", "rz_th_ht.h", "thread_hash_table.c"}
generic_types = {
"RzList",
"RzListIter",
"RzPVector",
"RzVector",
"RzGraph",
"HtPP",
"RzThreadRingBuf",
"RzThreadQueue",
}
skip_files = {
"ht_inc.c",
"ht_inc.h",
"rz_th_ht.h",
"rz_th.h",
"thread_hash_table.c",
"thread_queue.c",
"thread_ring_buf.c",
}
def cursor_get_comment(cursor: Cursor, *, packed: bool = False) -> Optional[str]:
@@ -190,21 +207,22 @@ def cursor_get_comment(cursor: Cursor, *, packed: bool = False) -> Optional[str]
return comment
# Check pointer (or lack of) and space between pointer
if typeref_spelling in {"RzList", "RzListIter", "RzPVector"}:
if typeref_spelling in {"RzList", "RzListIter", "RzPVector", "RzThreadQueue"}:
if comment[-2] != "*":
warn(f"Type comment at {stringify_location(cursor.location)} lacks pointer")
elif comment[-3] != " ":
warn(
f"Type comment at {stringify_location(cursor.location)} lacks space between pointer"
)
elif typeref_spelling in {"RzVector"}:
elif typeref_spelling in {"RzVector", "RzThreadRingBuf"}:
if comment[-2] == "*":
warn(
f"Type comment at {stringify_location(cursor.location)} should not have pointer"
)
elif typeref_spelling in {"RzGraph", "HtPP"}:
if not re.match(
r"<(struct )?[A-Za-z0-9_]+ \*, (struct )?[A-Za-z0-9_]+ \*>", comment
r"<(struct |const )?[A-Za-z0-9_]+ \*, (struct |const )?[A-Za-z0-9_]+ \*>",
comment,
):
if typeref_spelling == "RzGraph":
warn(
+1
View File
@@ -0,0 +1 @@
/bins
+42
View File
@@ -0,0 +1,42 @@
NAME=1-rz_core.py =
FILE=--
CMDS=<<EOF
!echo q | python3 ../examples/1-rz_core.py =
echo
EOF
EXPECT=<<EOF
Loaded 1 file(s)
Corefile #1 has 1 binfile(s)
* malloc://512
rizin>
EOF
EXPECT_ERR=
RUN
NAME=2a-rz_bin_plugin.py
FILE=--
CMDS=<<EOF
!echo q | python3 ../examples/2a-rz_bin_plugin.py bins/elf/analysis/ls-linux64
echo
EOF
EXPECT=<<EOF
name: bins/elf/analysis/ls-linux64
size: 121584
rizin>
EOF
EXPECT_ERR=
RUN
NAME=2b-rz_bin_plugin.py
FILE=--
CMDS=<<EOF
!echo q | python3 ../examples/2b-rz_bin_plugin.py bins/pe/hello_world_arm/hello_world_arm64.exe
echo
EOF
EXPECT=<<EOF
name: bins/pe/hello_world_arm/hello_world_arm64.exe
size: 8704
rizin>
EOF
EXPECT_ERR=
RUN
-15
View File
@@ -1,15 +0,0 @@
NAME=1-rz_core.py =
FILE=--
CMDS=<<EOF
!echo q | python3 examples/1-rz_core.py =
echo
EOF
EXPECT=<<EOF
Loaded 1 file(s)
Corefile #1 has 1 binfile(s)
* malloc://512
rizin>
EOF
EXPECT_ERR=<<EOF
EOF
RUN