Zydis
v4.1.0
|
Zydis version in various package repositories
Fast and lightweight x86/x86-64 disassembler and code generation library.
The following example program uses Zydis to disassemble a given memory buffer and prints the output to the console.
The above example program generates the following output:
The above example program generates the following output:
More examples can be found in the examples directory of this repository.
There are many ways to make Zydis available on your system. The following sub-sections list commonly used options.
Platforms: Windows, macOS, Linux, BSDs
You can use CMake to build Zydis on all supported platforms. Instructions on how to install CMake can be found here.
Platforms: Windows
We manually maintain a Visual Studio 2022 project in addition to the CMake build logic.
Platforms: Windows
CMake can be instructed to generate a Visual Studio project for pretty much any VS version. A video guide describing how to use the CMake GUI to generate such project files is available here. Don't be confused by the apparent use of macOS in the video: Windows is simply running in a virtual machine.
Platforms: any platform with a working C11 compiler
We provide an auto-generated single header & single source file variant of Zydis. To use this variant of Zydis in your project, all you need to do is to copy these two files into your project. The amalgamated builds can be found on our release page as zydis-amalgamated.tar.gz
.
These files are generated with the amalgamate.py
script.
Platforms: Windows, macOS, Linux, FreeBSD
Pre-built headers, shared libraries and executables are available through a variety of package managers.
<details>
</details>
Repository | Install command |
---|---|
Arch Linux | pacman -S zydis |
Debian | apt-get install libzydis-dev zydis-tools |
Homebrew | brew install zydis |
NixOS | nix-shell -p zydis |
Ubuntu | apt-get install libzydis-dev zydis-tools |
vcpkg | vcpkg install zydis |
An example on how to use Zydis in your own CMake based project can be found in this repo.
ZydisInfo
toolThe ZydisInfo
command-line tool can be used to inspect essentially all information that Zydis provides about an instruction.
Official bindings exist for a selection of languages:
If you're looking for an asmjit-style assembler front-end for the encoder, check out zasm. zasm also provides an idiomatic C++ wrapper around the decoder and formatter interface.
Versions follow the semantic versioning scheme. All stability guarantees apply to the API only. ABI stability is provided only between patch versions.
master
holds the bleeding edge code of the next, unreleased Zydis version. Elevated amounts of bugs and issues must be expected, API stability is not guaranteed outside of tagged commits.-beta
, -rc
, etc. suffixesmaintenance/v3
points to the code of the latest release of v3maintenance/v2
points to the code of the last legacy release of v2-fPIC
for shared library buildsUnder some circumstances (e.g. when building Zydis as a static library using CMake and then using Makefiles to manually link it into a shared library), CMake might fail to detect that relocation information must be emitted. This can be forced by passing -DCMAKE_POSITION_INDEPENDENT_CODE=ON
to the CMake invocation.
We offer consulting services and professional business support for Zydis. If you need a custom extension, require help in integrating Zydis into your product or simply want contractually guaranteed updates and turnaround times, we are happy to assist with that! Please contact us at busin. ess@ zyant ific .com
Donations are collected and distributed using flobernd's account.
Zydis is licensed under the MIT license.