chore: add repo hygiene config and project spec
Bootstrap the repository with the shared configuration every other piece depends on: - .gitignore: strict. Keeps build output, cargo caches, Android keystores, signing keys, .env files, local SQLite databases, IDE state and any credential-shaped filename out of history. CLAUDE.md 10.1 requires these never enter the repo. - .editorconfig, rustfmt.toml, clippy.toml: formatting and lint policy. clippy.toml is written in the lints-file form so lints are not duplicated into every crate manifest. CLAUDE.md is committed verbatim; it is the project spec and the parity contract for every platform layer. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
# Clippy is run with `-D warnings` in CI (CLAUDE.md §10.4), so every lint we
|
||||
# enable here is a build failure. Only turn on lints we are willing to fix.
|
||||
|
||||
[lints.rust]
|
||||
# Silent truncation of a u64 millisecond count into a u32 is a real bug class in
|
||||
# this codebase (usage counters, monotonic deltas). Make it impossible to miss.
|
||||
integer_conversions = "deny"
|
||||
|
||||
[lints.clippy]
|
||||
# Engine code is mostly pure data transformation; `&self` everywhere reads better
|
||||
# than `&mut self` and avoids accidental aliasing bugs across the FFI boundary.
|
||||
needless_pass_by_ref_mut = "warn"
|
||||
|
||||
# Large enum variants waste stack in the hot evaluate() path.
|
||||
large_enum_variant = "warn"
|
||||
|
||||
# Every OS call returns Result; we handle them all, but catch `.unwrap()` slips.
|
||||
unwrap_used = "deny"
|
||||
expect_used = "deny"
|
||||
|
||||
# Panicking in release builds is a last resort — see CLAUDE.md §0.5.
|
||||
panic = "deny"
|
||||
|
||||
# Prefer clarity over micro-optimisation; perf budgets in §5 are measured with
|
||||
# real benchmarks, not by guessing at clever rewrites.
|
||||
too_many_arguments = "warn"
|
||||
Reference in New Issue
Block a user