Skip to main content

Unicorn CPU emulator engine

Project description

Unicorn

Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU.

Unicorn offers some unparalleled features:

  • Multi-architecture: ARM, ARM64 (ARMv8), M68K, MIPS, PowerPC, RISCV, SPARC, S390X, TriCore and X86 (16, 32, 64-bit)
  • Clean/simple/lightweight/intuitive architecture-neutral API
  • Implemented in pure C language, with bindings for Crystal, Clojure, Visual Basic, Perl, Rust, Ruby, Python, Java, .NET, Go, Delphi/Free Pascal, Haskell, Pharo, and Lua.
  • Native support for Windows & *nix (with Mac OSX, Linux, *BSD & Solaris confirmed)
  • High performance via Just-In-Time compilation
  • Support for fine-grained instrumentation at various levels
  • Thread-safety by design
  • Distributed under free software license GPLv2

Further information is available at http://www.unicorn-engine.org

Python Bindings for Unicorn

Originally written by Nguyen Anh Quynh, polished and redesigned by elicn, maintained by all community contributors.

Install

Install a prebuilt wheel from PyPI:

python3 -m pip install unicorn

In case you would like to develop the bindings:

DEBUG=1 THREADS=4 python3 -m pip install --user -e .
# Workaround for Pylance
DEBUG=1 THREADS=4 python3 -m pip install --user -e . --config-settings editable_mode=strict

or install it by building it by yourself:

THREADS=4 python3 -m pip install --user .

Explanations for arguments:

  • THREADS=4 will use 4 threads for building.
  • DEBUG=1 will build debug version of unicorn.
  • --user will install the bindings to your user directory instead of requiring root permission.
  • -e infers the editable mode, which gives your instant feedback instead of re-compiling every time.

Note that you should setup a valid building environment according to docs/COMPILE.md but not necessarily build it because setup.py will do this for you.

Python2 compatibility

By default, Unicorn python bindings works with Python3.7 and above, as it offers more powerful features which improves developing efficiency compared to Python2. However, Unicorn will only keep compatible with all features Unicorn1 offers regarding Python2 because it has reached end-of-life for more than 3 years at the time of writing this README. While offering all features for both Python2 & Python3 is desirable and doable, it inevitably costs too much efforts to maintain and few users really rely on this. Therefore, we assume that if users still stick to Python2, previous Unicorn1 features should be enough. If you really want some new features Unicorn2 offers, please check and pull request to unicorn/unicorn_py2. We are happy to review and accept! Even though the build of wheel packages requires Python3, it's still possible to re-tag the wheel produced from Python3 with py2 tag and then run python2 -m pip install <retagged-wheel-py>. For detailed commands please refer to our workflow files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unicorn-2.1.4.tar.gz (2.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

unicorn-2.1.4-py2-none-win_amd64.whl (15.9 MB view details)

Uploaded Python 2Windows x86-64

unicorn-2.1.4-py2-none-win32.whl (11.8 MB view details)

Uploaded Python 2Windows x86

unicorn-2.1.4-py2-none-musllinux_1_2_x86_64.whl (16.9 MB view details)

Uploaded Python 2musllinux: musl 1.2+ x86-64

unicorn-2.1.4-py2-none-musllinux_1_2_i686.whl (20.5 MB view details)

Uploaded Python 2musllinux: musl 1.2+ i686

unicorn-2.1.4-py2-none-musllinux_1_2_aarch64.whl (16.1 MB view details)

Uploaded Python 2musllinux: musl 1.2+ ARM64

unicorn-2.1.4-py2-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (16.4 MB view details)

Uploaded Python 2manylinux: glibc 2.17+ x86-64

unicorn-2.1.4-py2-none-manylinux2014_i686.manylinux_2_17_i686.whl (19.8 MB view details)

Uploaded Python 2manylinux: glibc 2.17+ i686

unicorn-2.1.4-py2-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (15.4 MB view details)

Uploaded Python 2manylinux: glibc 2.17+ ARM64

unicorn-2.1.4-py2-none-macosx_11_0_arm64.whl (12.1 MB view details)

Uploaded Python 2macOS 11.0+ ARM64

unicorn-2.1.4-py2-none-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded Python 2macOS 10.9+ x86-64

unicorn-2.1.4-cp37-abi3-win_amd64.whl (15.9 MB view details)

Uploaded CPython 3.7+Windows x86-64

unicorn-2.1.4-cp37-abi3-win32.whl (11.8 MB view details)

Uploaded CPython 3.7+Windows x86

unicorn-2.1.4-cp37-abi3-musllinux_1_2_x86_64.whl (16.9 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

unicorn-2.1.4-cp37-abi3-musllinux_1_2_i686.whl (20.5 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

unicorn-2.1.4-cp37-abi3-musllinux_1_2_aarch64.whl (16.1 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

unicorn-2.1.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

unicorn-2.1.4-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (19.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ i686

unicorn-2.1.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

unicorn-2.1.4-cp37-abi3-macosx_11_0_arm64.whl (12.1 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

unicorn-2.1.4-cp37-abi3-macosx_10_9_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.7+macOS 10.9+ x86-64

File details

Details for the file unicorn-2.1.4.tar.gz.

File metadata

  • Download URL: unicorn-2.1.4.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unicorn-2.1.4.tar.gz
Algorithm Hash digest
SHA256 00567a70e323f749b419cd86bee4f9115beab7ebba32194581c090cbb7c59cff
MD5 90ffcab111f682ec1919acf448c5faa6
BLAKE2b-256 b21bb4248aa8422e86de690cf8e85cf8feae4c33405a097d1ebe71570bdaa6f5

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-win_amd64.whl.

File metadata

  • Download URL: unicorn-2.1.4-py2-none-win_amd64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: Python 2, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unicorn-2.1.4-py2-none-win_amd64.whl
Algorithm Hash digest
SHA256 c1d53d2416d270cf8a6a6e38c2530ca436494d6c7f4377a03d5eb07b25d8dc27
MD5 3a9d53fee3da780da88af1561b00d7f6
BLAKE2b-256 9c33011d3c9f9358718a1f6f91c72ce4682094bc61368aff90fad06b9f4126c7

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-win32.whl.

File metadata

  • Download URL: unicorn-2.1.4-py2-none-win32.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: Python 2, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unicorn-2.1.4-py2-none-win32.whl
Algorithm Hash digest
SHA256 6c9fffa46935bbd2d30db7f7ac6c5c809d3b512bcbdb53ced9796e27b27d6157
MD5 02a700f35bc03d5bf5cd85fd2f36d13a
BLAKE2b-256 e1ee762de7baacb5c51cf1040150cd1c05d22a97dd5d1b06c431fbbb919a6126

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 73d2eb557cc0255f18c55b15951c46dff1c07f996588df4cea1b1bdc5d69b184
MD5 e9b9063b2bc8e113aac12b0867f04772
BLAKE2b-256 f6435f47b2be97e256f026aced8cf9cdc68bc582762fc8bc1f269e9a86c97ff7

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 7eed9406a0503e91a2fecb250937aeb55291b2a3b9b51d23a39e7fc0be9a30d7
MD5 5567a0dc4583e956061180911571ef4b
BLAKE2b-256 b18bb6cfdbf3e1a1b2bd0342eb04cb616bae80100a2057f3cafe9fc316d6399c

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 35ac021ead8c992b15a511be73bf703429e5d346136ae38e6307c3d852655341
MD5 9f012ec9412f7eefc7e5d28e8003a302
BLAKE2b-256 83a0ed88f6b350016eb89fee1835501a5b4fd4ac5f4428fd3f2bab146d80e212

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a445476fff91e636b812d35ff1b0fb07f39ceaec0b3a86d246f7d431ff7766b3
MD5 2c3c90c3927e1372e7586f20775f3f60
BLAKE2b-256 a5e042118abb27edb1c69ef9c93b42358ecce2bff345e95b4ae3ae72822d2c9a

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-manylinux2014_i686.manylinux_2_17_i686.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-manylinux2014_i686.manylinux_2_17_i686.whl
Algorithm Hash digest
SHA256 cec2b7d3c407140ca9816e050c881b3fde7bf553e38169b7c52a2ce6719c9f43
MD5 b507329660a30939261a4fa87079b225
BLAKE2b-256 0aefedb3647c9d16418fc706caa3582a9178829310e512a2343f561a89e6789e

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 02630b1693f265d53cb6463334f81f23d96f5f58dd0602334e891302af738159
MD5 9b3f92ced22e92ce10c84b40f061eed1
BLAKE2b-256 e2a9b8eb96072a910ca0e43a9cf5ae9ba38491ed1ac6f98760d51ec7fe61f08f

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a7a94e67ce277c63112afa06640862b6c7395b8d42aec38f7a61a96c4b1658e
MD5 0e9e3ad3fb76c4f401085b5380fcb7ee
BLAKE2b-256 e4c8c935fe28ecd73be6cf9e643ce99d620c38bf0544f81dfa7fa09f48ee977e

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-py2-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-py2-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8687ec8f83cd40201ac7de3c52f7538754e61b5245c651a019711c7289ee26a4
MD5 48e537dbdbc597aeafb6645b778a9765
BLAKE2b-256 25ba085e9664ee4f82a9278c7aa5b3e32971fa7a993d0615c2ab465e8ff9018d

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: unicorn-2.1.4-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 15.9 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d7107500c64ce5c168fbff6bef9485b5db1350050036f4cea568650cf8bdbdf5
MD5 d0a6456f24423fa08f62bcadb10f6a49
BLAKE2b-256 703dde7be9bd1addabe6d8a1369381f8a080400c349850e978689c5e18287957

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-win32.whl.

File metadata

  • Download URL: unicorn-2.1.4-cp37-abi3-win32.whl
  • Upload date:
  • Size: 11.8 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 9be89e69be5e2631299f39a7fb8e47b8d3bfaa70ae746e9c4c5f9476a2df9778
MD5 dc17e9604d7a6fa73268f0e00e3c0de8
BLAKE2b-256 08236ae96f8efa8ede707cc67d18d76a08de498bd818483cf8211baf855eabb2

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d348a90ee90219d141cb115ef8ed7e3fd1af42afaee105f7580761d775b25e32
MD5 5bd9e4acd1bdc6465794a0bc68ec8267
BLAKE2b-256 ed4b4628ccb20eb3ad1af400de8181d1f4e5c1a3fc2affa1b3410c1b2d71af36

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 ce5c3bfd05f2a5749a0d8a960e1dfc26519a2d09377dc01cfa1378b936a953f8
MD5 3c4cc812a003c220c0a89d40ddee2a7e
BLAKE2b-256 35070b2fb9d2a462066aa24b7d18b463300df79cc4eaa471379f8af7d216261c

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 01d744ba01c5cc68f1d7afe3d183f1868720fd440ec4eaedc4d1d5d9bf54b84c
MD5 4ea318f059abc6f630f67784906f8194
BLAKE2b-256 7038ba5a051c844026e59ab6e0017db8cec77dbe20ab5f1d6edae1ce9d885b06

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d6e6dea140560de4ebd8446661f7ef84a357d428c14a3ef09dacd306ec8c239
MD5 55b5c7fb95ef021417a6d053d611b117
BLAKE2b-256 e7dfded5e3684c2d7600b30cc8a7530277b8cb36644a1a9d34cade7ebb45604c

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8f4e63b76ac4faa7cd32a4c436e96eabc24b91d52e73bde7699ec886bddf9277
MD5 e85240a53fa369f06562c4b1136772f8
BLAKE2b-256 5f7f83161916dedff22ddb187bd2751150a1bc53c88b7c1a8d6fa1cc9e144c64

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd1fb0c9af5f57e356d8a96928b4fe045b2e18f308ef23b481d5f970008aa722
MD5 c479259b13aa8699424d405ff5ca94e4
BLAKE2b-256 339f32d41eb942221bcf4417cdc65537fc8b3bbbd6079d6c161e621f1dd4e94a

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6c93e0f60328d8f4a1792af3f834137a28050fcc2305f2ec01efe8558a9844e
MD5 97d5f67a36f2cc77d404549d53aa1018
BLAKE2b-256 6cae4943c6f8524d729ec7d5e69df6407ea05d710fe77471d91cecf3fc64eb57

See more details on using hashes here.

File details

Details for the file unicorn-2.1.4-cp37-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for unicorn-2.1.4-cp37-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a6f738fab5fabffa56af1e7bbf16ea1e91466c342f8dc64f125bd70f36c6b80
MD5 8ee4e5bc4a7c29c84e4ad3d21edb2a44
BLAKE2b-256 c8a792b47771e2107a201632a199cec91e8a81ee8a071ca6b7e7d600d8c61ac9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page