oxidecomputer / oxidecomputer/dice-util
simplify `#[cfg(feature ...` shenanigans in `verifier-cli`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11
- Forks
- 3
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 16
Description
We've recently moved the hiffy interface to verfivier-cli behind a cargo feature. We have reasonable defaults set, and everything builds as it should (I think), but doing so required a lot of #[cfg(feature ... stuff. The end result is unfortunately less readable / comprehensible code. Everything's a trade off and since this currently works I'm not proposing any immediate changes. Instead this issue should serve as a place to collect opinions on what, if any changes can be made to mitigate this.
The the approach that comes to mind immediately is to hard code support for at least one interface. This could be an interface to the mock / simulator of the RoT if we don't want to hard code a dependency on any of the other interfaces. AFAIK the only interface that must be behind a feature is ipcc due to linking stuff & libipcc.so.
Contributor guide
No contributing guide indexed for this repository
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
Start by reviewing the feature-gated hiffy interface in verifier-cli, including the mock or simulator interface and the ipcc integration that requires libipcc.so. Gather the existing #[cfg(feature ...)] branches and compare possible ways to keep at least one interface hard-coded. Done means the project agrees on an approach and the resulting verifier-cli code is more readable without breaking supported feature combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100