karlbohlmark / libbpf_zig

Zig package for libbpf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libbpf package for zig

This is libbpf, packaged for Zig.

How to use it

First, update your build.zig.zon:

zig fetch --save https://github.com/tw4452852/libbpf_zig/archive/refs/tags/1.3.0.tar.gz

Next, add this snippet to your build.zig script:

const libbpf_dep = b.dependency("libbpf_zig", .{
    .target = target,
    .optimize = optimize,
});
your_compilation.linkLibrary(libbpf_dep.artifact("bpf"));

This will add libbpf as a static library to your_compilation.

About

Zig package for libbpf

License:GNU General Public License v3.0


Languages

Language:Zig 100.0%