- Document the need for external rustfmt invocation.
- Remove reexports.
- Remove `write_to_file`.
- Avoid allocating strings when using bindgen to write bindings.
This can be done externally. Do so in CI.
This is an attempt to resolve the inconsistency between CI and local
rustfmt in the generated bindings.
Restore running CI on generated branches; the presence of a PR is
apparently not enough.
Change FromRawTracepointArgs::arg to return T rather than *const T which
seems to have been returning a dangling pointer.
Arguably this is not strictly necessary; edition 2024 seems to be
focused on increased strictness around unsafe code which doesn't unlock
new functionality for our users. That said, this work revealed an
apparent bug (see above) that we wouldn't otherwise catch due to
allow-by-default lints.
Per the comment added in the code, there are 2 definitions of
BPF_F_LINK in the kernel headers. Once is in an anonymous enum which
bindgen will constify, and once is via a #define macro. The values are
identical. The fix is to exclude BPF_F_LINK from the list of variables
in bindgen removing one of the duplicate definitions.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This will generate bindings for mips the next time that the codegen job
is run.
Signed-off-by: Ishan Jain <contact@ishanjain.me>
Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
This commit adds the s390x and powerpc architectures
to codegen. This will enable an upcoming PR to add
support for aya to support theses architectures
in both aya and aya-ebpf.
Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
Currently, when running `cargo +nightly xtask codegen` locally and in
the codegen GHA workflow, an error occurs with only "Error: bindgen
failed" displayed.
This was due to a path using "bpf/..." instead of "ebpf/...". It is now
corrected to "ebpf", and bindgen fails should now display a more direct
message on why it failed.
Fixes: #914