Run Rust formatting, tests, and Clippy in CI
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 121
- Forks
- 45
- Avg merge
- 18h 43m
- Merged PRs (30d)
- 10
Description
Context
The CI jobs named “Format, check, and test examples” run ./scripts/test.py --operation validate:
.github/workflows/ci.yml:27-44.github/workflows/ci.yml:46-62
That validation runs Roc tests/format/check operations, but it does not run Rust formatting, Rust tests, or Clippy. At commit 295000a during the release-candidate audit:
cargo check --locked --all-targetspassed;cargo fmt --all -- --checkfailed on formatting insrc/lib.rs;cargo test --locked --all-targetspassed but ran zero Rust tests;cargo clippy --locked --all-targets -- -D warningsfailed on generated acronym names and a raw-pointer ABI lint.
The generated src/roc_platform_abi.rs needs targeted lint allowances rather than disabling useful linting for handwritten host code.
Suggested direction
Add a dedicated Rust validation job or extend the current validation job to run:
cargo fmt --all -- --checkcargo test --locked --all-targetscargo clippy --locked --all-targets -- -D warnings
Configure narrow allowances for generated glue. Add unit tests for pure host helpers and error mappings so cargo test provides meaningful coverage in addition to end-to-end Roc examples.
Acceptance criteria
- Rust formatting is required by CI and the current formatting difference is fixed.
- Handwritten Rust passes Clippy with warnings denied.
- Generated glue has documented, narrowly scoped lint allowances.
- Rust tests cover representative HTTP method/error mapping, TCP read helpers, SQLite lifecycle helpers, and filesystem classification.
- Contributor verification instructions list the same commands CI runs.
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
Start with the two validation jobs in .github/workflows/ci.yml:27-44 and 46-62, then inspect ./scripts/test.py --operation validate and src/lib.rs. Run the listed cargo fmt, cargo test, and cargo clippy commands to reproduce current failures; done means CI enforces them, generated src/roc_platform_abi.rs has narrow documented allowances, and the requested host-helper tests and contributor instructions are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, rust
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100