Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
16d8d95
update readme
wtdcode Apr 10, 2025
b94ff99
add UC_CTL go bindings
Jun 21, 2025
2da916c
glib_compat/glib_compact: Clear the buffer in g_hash_table_resize (#2…
MarsDoge Jul 22, 2025
052f33e
Enable install for rust bindings (#2224)
wtdcode Aug 4, 2025
cdf38b9
Remove ninja installation from macos runners (#2225)
scribam Aug 6, 2025
8803d46
Fix `read_sprr_perm` for Apple real CPUs and GitHub Actions; enable A…
patryk4815 Aug 8, 2025
2e76a45
Fix cmake deprecation warning (#2226)
scribam Aug 8, 2025
e9e2d3f
Add support for clangarm64 (#2228)
scribam Aug 16, 2025
869969f
Revert "glib_compat/glib_compact: Clear the buffer in g_hash_table_re…
wtdcode Aug 30, 2025
3132d29
Python bindings: Use ABI3 wheels (#2223)
Antelox Sep 9, 2025
8f29cc9
concurrent control (#2235)
wtdcode Sep 9, 2025
667febe
Sync FAQ
wtdcode Sep 9, 2025
bd8dd78
bump 2.1.4
wtdcode Sep 9, 2025
72a37ac
bump consts
wtdcode Sep 9, 2025
d515023
Update ChangeLog
wtdcode Sep 9, 2025
c0915a7
fix rust bindings
wtdcode Sep 9, 2025
efb1354
Also add bindings.rs wrapper
wtdcode Sep 9, 2025
231df7d
update changelog
wtdcode Sep 9, 2025
12d7a52
refactor rust packages
wtdcode Sep 9, 2025
d51e192
refactor rust directories
wtdcode Sep 9, 2025
1017230
add a comment
wtdcode Sep 9, 2025
d891611
update release ci
wtdcode Sep 9, 2025
1da40fe
Fix incorrect folder name under release
wtdcode Sep 9, 2025
5cc267d
implement glib_random_bytes for msvc
wtdcode Sep 9, 2025
2a2bcc8
fix again
wtdcode Sep 9, 2025
b1893ab
add UC_CTL go bindings
Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/Crate-publishing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Crate 📦 Distribution

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
paths-ignore:
Expand Down Expand Up @@ -47,19 +51,14 @@ jobs:
run: |
choco install ninja

- name: "🛠️ macOS build dependencies"
if: contains(matrix.config.os, 'macOS')
shell: bash
run: |
brew install ninja

- name: "🚧 Cargo test"
if: "!startsWith(github.ref, 'refs/tags')"
run: |
cargo test

- name: Publish crates to Crates.io
if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu')
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.cratesio_token }}
env:
TOKEN: ${{ secrets.cratesio_token }}
run: |
cargo login $TOKEN && cargo publish -p unicorn-engine-sys && cd bindings/rust/unicorn-engine && cargo publish -p unicorn-engine
6 changes: 5 additions & 1 deletion .github/workflows/Nuget-publishing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Nuget 📦 Distribution

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


on:
push:
paths-ignore:
Expand Down Expand Up @@ -159,7 +164,6 @@ jobs:
if: contains(matrix.config.name, 'macos-x64')
shell: bash
run: |
brew install ninja
ninja --version
cmake --version
mkdir build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/build-uc2.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build UC2

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -164,7 +168,7 @@ jobs:
cmake --build . --config ${{ env.BUILD_TYPE }}
cmake --install . --strip --config ${{ env.BUILD_TYPE }}
ctest -VV -C ${{ env.BUILD_TYPE }}
mv Debug instdir
mv ${{ env.BUILD_TYPE }} instdir

- name: '🛠️ Win MSVC 32 setup'
if: contains(matrix.config.name, 'MSVC 32')
Expand All @@ -191,7 +195,7 @@ jobs:
cmake --build . --config ${{ env.BUILD_TYPE }}
cmake --install . --strip --config ${{ env.BUILD_TYPE }}
ctest -VV -C ${{ env.BUILD_TYPE }}
mv Debug instdir
mv ${{ env.BUILD_TYPE }} instdir

- name: '🚧 Win MINGW build'
if: contains(matrix.config.mingw, 'MINGW')
Expand Down Expand Up @@ -294,7 +298,6 @@ jobs:
if: contains(matrix.config.name, 'macos')
shell: bash
run: |
brew install ninja
ninja --version
cmake --version
mkdir build
Expand All @@ -314,7 +317,6 @@ jobs:
if: contains(matrix.config.name, 'android')
shell: bash
run: |
brew install ninja
mkdir build
mkdir instdir
cmake . -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake" \
Expand Down
169 changes: 21 additions & 148 deletions .github/workflows/build-wheels-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build and publish wheels with cibuildwheel

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
inputs:
Expand All @@ -11,14 +15,6 @@ on:
options:
- '0'
- '1'
fullMode:
description: 'Full Mode'
required: false
default: ''
type: choice
options:
- '0'
- '1'
push:
paths-ignore:
- ".gitignore"
Expand All @@ -38,7 +34,7 @@ env:

jobs:
# job to be executed for every push - testing purpose
build_wheels_python38_only:
build_and_test_wheels:
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -47,21 +43,21 @@ jobs:
include:
# NOTE: Doing this to parallelize and speed up workflow
# i686 - manylinux
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-manylinux*', cibw_skip: 'cp36*' }
# i686 - musllinux
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp38-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp*-musllinux*', cibw_skip: 'cp36*' }
# x86_64 - manylinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-manylinux*', cibw_skip: 'cp36*' }
# x86_64 - musllinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp38-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp*-musllinux*', cibw_skip: 'cp36*' }
# aarch64 - manylinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-manylinux*', cibw_skip: 'cp36*' }
# aarch64 - musllinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp38-musllinux*', cibw_skip: '' }
- { os: macos-13, arch: x86_64, cibw_build: 'cp38*', cibw_skip: '' }
- { os: macos-latest, arch: arm64, cibw_build: 'cp38*', cibw_skip: '' }
- { os: windows-2022, arch: AMD64, cibw_build: 'cp38*', cibw_skip: '' }
- { os: windows-2022, arch: x86, cibw_build: 'cp38*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp*-musllinux*', cibw_skip: 'cp36*' }
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: 'cp36*' }
- { os: macos-14, arch: arm64, cibw_build: 'cp*', cibw_skip: 'cp36* cp37*' }
- { os: windows-2022, arch: AMD64, cibw_build: 'cp*', cibw_skip: 'cp36*' }
- { os: windows-2022, arch: x86, cibw_build: 'cp*', cibw_skip: 'cp36*' }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -113,7 +109,7 @@ jobs:
uses: docker/setup-qemu-action@v3

- name: '🚧 cibuildwheel run'
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_BUILD_FRONTEND: build
CIBW_BUILD: ${{ matrix.cibw_build }}
Expand All @@ -136,10 +132,10 @@ jobs:
shell: bash
run: |
python3 -m pip install -U pip wheel
python3 -m wheel tags --python-tag='py2' --abi-tag=none wheelhouse/*cp38*.whl
python3 -m wheel tags --python-tag='py2' --abi-tag=none wheelhouse/*cp37*.whl

- uses: LizardByte/[email protected]
if: (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp38-manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64') || (runner.os == 'Windows' && matrix.arch == 'AMD64')
- uses: LizardByte/actions/actions/[email protected]
if: (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp*-manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64') || (runner.os == 'Windows' && matrix.arch == 'AMD64')
with:
python-version: 2.7

Expand All @@ -153,135 +149,12 @@ jobs:

# NOTE: no python2.7 support for macos-13: https://github.com/LizardByte/setup-python-action/issues/2
- name: 'Python 2.7 tests - Non-Windows'
if: (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp38-manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64')
if: (runner.os == 'Linux' && (matrix.arch == 'x86_64' || matrix.arch == 'aarch64') && matrix.cibw_build == 'cp*-manylinux*') || (runner.os == 'macOS' && matrix.arch == 'arm64')
run: |
python2 -m pip install capstone==4.0.2 wheelhouse/*py2*.whl
python2 -m unittest discover tests/regress "*.py"

# https://github.com/unicorn-engine/unicorn/issues/2033
# Skip macos arm64 wheels during release stage
- uses: actions/upload-artifact@v4
if: ${{!( startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.os, 'macos') && contains(matrix.arch, 'arm64') )}}
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./wheelhouse/*.whl

# Job to be executed to build all wheels for all platforms/architectures/python versions only for tag release
build_wheels_all_versions:
name: Building on ${{ matrix.os }} - ${{ matrix.arch }} - ${{ matrix.cibw_build }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# NOTE: Doing this to parallelize and speed up workflow
# i686 - manylinux
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
# i686 - musllinux
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: i686, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
# x86_64 - manylinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
# x86_64 - musllinux
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
- { os: ubuntu-latest, arch: x86_64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
# aarch64 - manylinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-manylinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-manylinux*', cibw_skip: '' }
# aarch64 - musllinux
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp37-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp39-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp310-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp311-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp312-musllinux*', cibw_skip: '' }
- { os: ubuntu-24.04-arm, arch: aarch64, cibw_build: 'cp313-musllinux*', cibw_skip: '' }
- { os: macos-13, arch: x86_64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
- { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' }
- { os: windows-2022, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
- { os: windows-2022, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *38*' }
if: ${{ inputs.fullMode == 1 || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')) || contains(github.event.head_commit.message, 'CI(full)') }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# https://github.com/actions/upload-artifact/issues/22
- name: Prepare a unique name for Artifacts
shell: bash
run: |
# replace not-allowed chars with dash
name="cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cibw_build }}"
name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g' | sed -e 's/\-$//')
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV

- name: "Increase pagefile to avoid OOM"
if: runner.os == 'Windows'
uses: al-cheb/[email protected]
with:
minimum-size: 8GB
disk-root: "C:"

- name: '🛠️ Add msbuild to PATH'
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2
with:
vs-version: '17'

- name: '🛠️ Win MSVC 32 dev cmd setup'
if: runner.os == 'Windows' && matrix.arch == 'x86'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86

- name: '🛠️ Win MSVC 64 dev cmd setup'
if: runner.os == 'Windows' && matrix.arch == 'AMD64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: '🛠️ Set up QEMU'
if: runner.os == 'Linux' && matrix.arch == 'i686'
uses: docker/setup-qemu-action@v3

- name: '🚧 cibuildwheel run'
uses: pypa/[email protected]
env:
CIBW_BUILD_FRONTEND: build
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_ENVIRONMENT: DEBUG=${{ env.UNICORN_DEBUG }} GENERATORS='Visual Studio 17 2022'
CIBW_ENVIRONMENT_PASS_LINUX: DEBUG
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: 'python -m unittest discover -v {project}/tests/regress "*.py"'
with:
package-dir: bindings/python
output-dir: wheelhouse

- uses: actions/upload-artifact@v4
if: ${{!( startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.os, 'macos') && contains(matrix.arch, 'arm64') )}}
with:
name: ${{ env.ARTIFACT_NAME }}
path: ./wheelhouse/*.whl
Expand All @@ -307,7 +180,7 @@ jobs:
path: bindings/python/dist/*.tar.gz

publish:
needs: [ build_wheels_python38_only, build_wheels_all_versions, make_sdist ]
needs: [ build_and_test_wheels, make_sdist ]
environment: pypi
permissions:
id-token: write
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on:
workflow_dispatch:


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: Upload Prerelease Assets

jobs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on:
workflow_dispatch:


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: Upload Release Assets

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/zigbuild.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Zig Build

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
paths-ignore:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ cmocka/
zig-cache/
zig-out/
.cache
bindings/rust/sys/src/bindings.rs

##################
## PyCharm Project
Expand Down
Loading