# Rust Ffi Lint Triage

> Resolve clippy and warning failures in Rust FFI-heavy code using source fixes first and narrow lint allowances only when required.

- Skill: `plevasseur/rust-ffi-lint-triage` (Agent Skill)
- Install (CLI): `npx skillmds@latest add plevasseur/rust-ffi-lint-triage`
- Raw SKILL.md: https://api.skillmd.com/api/skills/plevasseur/rust-ffi-lint-triage/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: Apache-2.0
- Author: PLeVasseur (https://skillmd.com/u/plevasseur)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/plevasseur/rust-ffi-lint-triage

---


## When to use

Use this skill when CI fails in `cargo clippy --all-targets -- -W warnings -D warnings`, especially in `vsomeip-sys` or other binding-heavy code.

## Triage order

1. Fix warnings at source when practical:
   - replace deprecated/older patterns (for example `std::io::Error::new(...Other...)` -> `std::io::Error::other(...)`)
   - use preferred iterator forms (for example `next_back()` where clippy suggests it)
   - clean doc formatting and genuinely unused code/variables
2. For FFI/generated-binding constraints, use narrow allowances:
   - prefer method-level `#[allow(...)]` over module/crate-level suppression
   - document why the allowance is required by wrapper semantics
3. Avoid broad suppression unless unavoidable for generated interop behavior.

## Generated-binding policy

- Prefer fixes in handwritten wrapper/glue layers first; keep allowances narrow and local.
- Avoid editing generated binding files directly unless regeneration is explicitly in scope.
- If regeneration is in scope, keep generated changes isolated and document the regeneration command in the PR notes.

## Validation loop

1. `source build/envsetup.sh highest`
2. `cargo clippy --all-targets -- -W warnings -D warnings`
3. If clippy passes, run `cargo test -- --test-threads 1` to ensure behavior remains intact.

## Decision notes to include in PR

- Which warnings were fixed at source
- Which lint allowances were added and why they are narrowly scoped
- Any known tradeoffs or follow-up cleanups

