o
odinpkg.dev
packages / binding / zydis-odin

zydis-odin

6d62ed8binding

Odin bindings for Zydis

MIT · updated 5 months ago

zydis-odin

Odin bindings for Zydis, an x86/x86-64 disassembler and encoder library.

Prerequisites

You'll need a few things sorted before getting started:

Building Zydis

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 .\lib

The script pins a specific Zydis commit so builds are reproducible. If the source directory already exists, it'll skip the clone and just rebuild.

Options

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

Usage

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!
}

Licence

MIT -- see LICENSE for the full text.