Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Zydis Bindings for Go
C Go C++ Makefile
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cgo
cmd
.gitattributes
.gitignore
LICENSE.md
README.md
addresswidth.go
callbackmap.go
cpuflagaction.go
decoder.go
element.go
features.go
formatter+callbacks.go
formatter.go
instruction.go
instructioncategory_string.go
isaext.go
isaext_string.go
isaset.go
isaset_string.go
libzydis_darwin_amd64.syso
libzydis_linux_amd64.syso
libzydis_windows_386.syso
libzydis_windows_amd64.syso
machinemode.go
mnemonic.go
mnemonic_string.go
opcodemap.go
operand.go
register.go
register_string.go

README.md

Zydis Bindings for Go

Zydis is a fast and lightweight x86/x86-64 disassembler library. This repo provides bindings to Go via cgo and is considered a "complete" wrapper of the Zydis API, ready for production use.

It was created because the pure-Go disassembler is signficantly lacking in AMD64 support. Decoding x86 is complex business, and it was more straightforward to make this port instead of digging deep into the pure-Go package.

This repository uses Git LFS to store a precompiled version of the Zydis library (see below), so please make sure you have it installed before getting this package.

Import

import "code.jpap.org/go-zydis"

Sample code

See the file cmd/demo.go.

Upgrading Zydis library

The Zydis library is packaged as a static syso object file so that this package is go gettable. Precompiled macOS (amd64), Linux (amd64), and Windows (amd64, 386) binaries are provided.

Use the Makefile in the cgo/ folder to upgrade to a newer version, rebuild, or add support for another platform. The default Makefile target clones the Zydis repo and its submodule, performs the build, and creates the syso files for Go linkage under macOS with suitable cross-compilers installed.

License

MIT, see the LICENSE.md file.

You can’t perform that action at this time.