Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zig package #4

Closed
wants to merge 3 commits into from
Closed

Zig package #4

wants to merge 3 commits into from

Conversation

kassane
Copy link

@kassane kassane commented Apr 27, 2023

The fork is the initial support base for zig developers, in addition to trying zig-pkg (MVP) v0.11.x-dev.
Later it will be able to be linked into any zig project without depending on external tools (maybe porting to zig-build libelf-dev too)

Note: Theoretically it works similar to go mod or fetchContent (cmake).

cc: @anakryiko - If the original project can support the zig build-system, then just replace (kassane/libbpf -> libbpf/libbpf) the url + hash in the zon file of this binding. See: libbpf/libbpf@master...kassane:libbpf:zig-pkg

More info about zig-pkg

@anakryiko
Copy link

@kassane sorry, can you tl;dr what's your ask w.r.t. libbpf and its support for zig's build system?

@tw4452852
Copy link
Owner

Wow, that's amazing, I'm pleasure to use zig's builtin package manage if libbpf supports it.

@kassane
Copy link
Author

kassane commented Apr 28, 2023

@kassane sorry, can you tl;dr what's your ask w.r.t. libbpf and its support for zig's build system?

Yes! Would you accept to add to the zig-build project? (Avoiding libbpf parallel version).
Unfortunately zig cc/zig c++ is quite complicated on conventional build-systems because of the space in the subcommand ' '. Besides, zig-build/zig-pkg is not restricted to ziglang projects.

@anakryiko
Copy link

Ah, sorry for misleading you. I assumed you'd like use to adjust libbpf's Makefile (or something about layout, etc) to make it easier to build libbpf with Zig-related infrastructure. Adding and maintaining parallel Zig build script for libbpf is not something I'd like to do, sorry. Hopefully it won't be too much trouble to maintain this on the side.

@tw4452852
Copy link
Owner

Hi @kassane

I'm afraid we may hold this PR a while due to some fixup on vendored libbpf (bad505e). Because it's Zig specific so I'm afraid it would not be accepted on upstream.

@kassane
Copy link
Author

kassane commented May 9, 2023

Ok.

The main purpose of this PR is to avoid static dependencies.
But already aware of this possibility from the new zig version, you can find better use.

@kassane kassane closed this May 9, 2023
@tw4452852
Copy link
Owner

Hi @kassane

As 0.1.0 is released, zbpf embraces Zig's package manager for the external dependencies. FYI.

@kassane
Copy link
Author

kassane commented Dec 27, 2023

As 0.1.0 is released, zbpf embraces Zig's package manager for the external dependencies. FYI.

@tw4452852, awesome. I will test it and give feedback.

@kassane kassane deleted the zig-pkg branch December 27, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants