Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1012 Bytes

File metadata and controls

37 lines (28 loc) · 1012 Bytes

zydis-zig

zydis-zig is a small Zig package wrapper around vendored Zydis source plus the x86_64 decoder bridge used by zighook.

It exists so projects can depend on Zydis-related build inputs without copying the full vendored C source into every consumer repository.

Package contents

  • vendor/zydis/
    • vendored amalgamated Zydis source and licenses
  • c/x86_64/decoder_zydis.c
    • private decoder bridge used by zighook
  • src/root.zig
    • documentation-only Zig module

Using from another package

In a consumer build.zig:

const zydis_dep = b.dependency("zydis_zig", .{
    .target = target,
    .optimize = optimize,
});

module.addIncludePath(zydis_dep.path("vendor/zydis"));
module.addCSourceFile(.{
    .file = zydis_dep.path("c/x86_64/decoder_zydis.c"),
    .flags = &.{"-std=c99"},
});

This package intentionally keeps the C interface private. Consumers are expected to compile the bridge C source rather than import Zydis declarations directly into public Zig APIs.