Currently, there is no way to add custom derives to libbpf-cargo generated types.
My intended usage of this is to derive https://docs.rs/zerocopy/latest/zerocopy/trait.FromBytes.html for some generated structs to access them(which could come from bpf ringbuf as &[u8]
) in a safe, zero-copy and idiomatic way in rust.