Odin bindings for Zydis, an x86/x86-64 disassembler and encoder library.
You'll need a few things sorted before getting started:
The included build script handles cloning and compiling Zydis for you. Just tell it where to put the source and where you'd like the libraries.
build_zydis.cmd --clone-dir .\zydis-src --install-dir .\libThe script pins a specific Zydis commit so builds are reproducible. If the source directory already exists, it'll skip the clone and just rebuild.
| Flag | Description | Default |
|---|---|---|
--clone-dir DIR |
Where to clone the Zydis source | required |
--install-dir DIR |
Where to copy the built libraries | required |
--config TYPE |
debug or release |
release |
--no-libc |
Build without libc | on |
--with-tools |
Build the Zydis CLI tools | off |
--with-examples |
Build the example programmes | off |
--jobs N |
Parallel build jobs | auto |
Drop the zydis.odin file into your project (or add it as a collection), and point the linker at wherever you put the built libraries.
odin build . -extra-linker-flags:"/LIBPATH:path/to/lib /NODEFAULTLIB:msvcrtd.lib"package main
import "XXX:zydis"
main :: proc() {
// You're ready to start Zydis-ing!
}MIT -- see LICENSE for the full text.