Skip to content

Expand to 265 rules / 26 categories, refresh for Rust 1.96, add compile-checked CI#2

Merged
leonardomso merged 11 commits into
masterfrom
feat/expand-to-265-rules
Jun 14, 2026
Merged

Expand to 265 rules / 26 categories, refresh for Rust 1.96, add compile-checked CI#2
leonardomso merged 11 commits into
masterfrom
feat/expand-to-265-rules

Conversation

@leonardomso

Copy link
Copy Markdown
Owner

Summary

Grows the skill from 179 rules / 14 categories to 265 rules / 26 categories, refreshes everything for the Rust 2024 edition / Rust 1.96, and makes every code example compile-verified and guarded by CI.

New categories (86 new rules)

  • Unsafe Code (unsafe-), Concurrency (conc-), Conversions (conv-), Pattern Matching (pat-)
  • Numeric & Arithmetic Safety (num-), Serde (serde-)
  • Macros (macro-), Observability (obs-)
  • Closures (closure-)
  • Const & Compile-Time (const-), Trait & Generics Design (trait-), Collections (coll-)

…plus new rules added across existing categories (e.g. mem-take-replace, async-fn-in-trait, api-impl-fromiterator, perf-ahash).

Currency & correctness

  • Updated throughout for the 2024 edition / Rust 1.96 and recent stabilizations.
  • Fixed real bugs in existing rules, e.g. &mut T is not Copy, impl Trait in traits is stable (1.75), collect_into is still nightly, resolver = "3", env::set_var is now unsafe, MaybeUninit array conversions (stable 1.95), and a false "specialization works on stable" claim in blanket impls.

Tooling & maintainability

  • checks/ compile harness: extracts every ```rust block and type-checks it; classifies failures by compiler error code (real bugs vs undefined-symbol fragments). 275 examples compile clean on Rust 1.95.
  • checks/gen_index.py generates SKILL.md's table + Quick Reference and the rule counts from the rule files, so the index can't drift.
  • GitHub Actions CI (.github/workflows/ci.yml): validates rule structure, links, and index parity, then compile-checks the examples against a baseline (fails only on new regressions).
  • Added CONTRIBUTING.md and CHANGELOG.md; expanded README + per-rule sourcing.

Verification

checks/validate.py, checks/gen_index.py --check, and the compile baseline all pass locally on Rust 1.95.

🤖 Generated with Claude Code

@leonardomso leonardomso force-pushed the feat/expand-to-265-rules branch from f98abca to dad723a Compare June 14, 2026 22:39
The SIMD/target-cpu examples returned () from cfg(target_arch="x86_64") blocks and unsafe fns, so they only compiled on non-x86 hosts (where the blocks are cfg'd out). Make them return their declared types and compile on every arch.
Add checks/check.sh as the single entrypoint CI and contributors both run. Pin the toolchain and compile target via checks/rust-toolchain.toml (Rust 1.95.0, x86_64-unknown-linux-gnu) and commit Cargo.lock so example checks are deterministic across machines. Baseline regenerated for the x86_64 target.
@leonardomso leonardomso merged commit fd2a861 into master Jun 14, 2026
1 check passed
@leonardomso leonardomso deleted the feat/expand-to-265-rules branch June 14, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant