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

Improve and extend use of bindgen #403

Open
FelixMcFelix opened this issue Oct 26, 2023 · 1 comment
Open

Improve and extend use of bindgen #403

FelixMcFelix opened this issue Oct 26, 2023 · 1 comment
Labels
cleanup Code cleanliness

Comments

@FelixMcFelix
Copy link
Collaborator

FelixMcFelix commented Oct 26, 2023

Currently, we have a mixture of binding styles in OPTE. We have handspun bindings in e.g., illumos_sys_hdrs and xde::{dls, mac_sys, secpolicy, sys}, while the bindgen'd xde::ip is manually triggered.

While illumos header definitions are fairly stable, I'd rather it be the case that a) all *_sys type definitions are automatically updated for the target system, and b) extra kernel APIs we need to make use of (mac_link_* and friends) are minimal friction to add and that we can be certain of correctness. On point a) in particular, we should really be maximising the use of build.rs-managed _sys crates.

Once complete, these might be good to remove from the repo to help support future kernel/driver work in illumos.

@FelixMcFelix FelixMcFelix added the cleanup Code cleanliness label Oct 26, 2023
@rcgoodfellow
Copy link
Contributor

Bingen can have some pretty major pitfalls. Something worth considering as an alternative is ctf-bindgen. It's still very much at the "prototype an idea and see how it goes" phase, but worth thinking about as a future direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanliness
Projects
None yet
Development

No branches or pull requests

2 participants