libbpf-rs icon indicating copy to clipboard operation
libbpf-rs copied to clipboard

Better interop with bindgen generated types?

Open danielocfb opened this issue 2 years ago • 0 comments

(there is some potential overlap with https://github.com/libbpf/libbpf-rs/issues/602 and perhaps even https://github.com/libbpf/libbpf-rs/issues/590, depending on what we end up building, but let's perhaps capture issues as we identify them currently)

There may be cases where it is unavoidable for a user to use bindgen for generating Rust types for something not otherwise interacted with by libbpf-cargo. In such an instance -- the current thinking goes -- it may be necessary for users to hook up bindgen themselves. This can potentially result in a situation where there is an overlap between what bindgen and libbpf-rs generates and that, in turn, could result in bad ergonomics, because these would be distinct types at the Rust level and there is no way to convert the two.

We need to come up with a good story to mitigate such a situation.

danielocfb avatar Nov 03 '23 22:11 danielocfb