Skip to content

Customize derives for libbpf-cargo generated types #1240

@kxxt

Description

@kxxt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions