oxidecomputer / oxidecomputer/opte
Improve and extend use of bindgen
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the hand-spun bindings in illumos_sys_hdrs and xde::{dls, mac_sys, secpolicy, sys} with the manually triggered bindings in xde::ip. Start by tracing the build.rs-managed _sys crates and existing bindgen setup; done means all sys type definitions update automatically for the target system and the required mac_link* kernel APIs can be added with minimal manual binding work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, networking, operating-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100