Luigit
repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by admin

.cargo/config.toml

Raw
[alias]
x = "run -p xtask --"

# Keep universal policy in a matching target table so platform-specific flags
# compose with it instead of replacing it.
[target.'cfg(all())']
rustflags = [
    # Zero warnings policy
    "-D", "warnings",

    # Core lint groups
    "-D", "clippy::all",
    "-D", "clippy::pedantic",
    # High-signal rule: pedantic members kept only when they catch real
    # bugs far more often than they cry wolf. Demoted after observed
    # false-positive friction:
    "-A", "clippy::module_name_repetitions",
    "-A", "clippy::must_use_candidate",
    "-W", "clippy::nursery",
    "-D", "clippy::suspicious",
    "-D", "clippy::complexity",
    "-D", "clippy::perf",
    "-D", "clippy::style",
    "-D", "clippy::correctness",

    # Restriction lints — prohibited patterns
    "-D", "clippy::unwrap_used",
    "-D", "clippy::expect_used",
    "-D", "clippy::panic",
    "-D", "clippy::todo",
    "-D", "clippy::unimplemented",
    "-D", "clippy::print_stdout",
    "-D", "clippy::print_stderr",

    # Memory law (.system/RULES.md): explicit sharing, no hidden copies
    "-D", "clippy::clone_on_ref_ptr",
    "-D", "clippy::rc_buffer",
    "-D", "clippy::rc_mutex",
    "-D", "clippy::mutex_atomic",
    "-D", "clippy::mutex_integer",
    "-D", "clippy::redundant_clone",
    "-D", "clippy::implicit_clone",
    "-D", "clippy::inefficient_to_string",
    "-D", "clippy::large_stack_arrays",
    "-D", "clippy::large_types_passed_by_value",
    "-D", "clippy::trivially_copy_pass_by_ref",
    "-D", "clippy::needless_pass_by_value",

    # Documentation lints
    "-D", "missing_docs",
    "-D", "rustdoc::missing_crate_level_docs",
    "-D", "rustdoc::broken_intra_doc_links",
    "-W", "rustdoc::invalid_html_tags",
    "-W", "rustdoc::bare_urls",
]

[registries.crates-io]
protocol = "sparse"

# Linker choice is a machine preference (e.g. mold via ~/.cargo/config.toml
# target tables, which compose with the universal table above); the repo
# links with the toolchain default so any image builds it.

# Native Termux ARM64: vendored LuaJIT needs compiler-rt for __clear_cache.
# `latest` is Termux's stable symlink to the installed Clang resource version.
[target.aarch64-linux-android]
rustflags = [
    "-L", "native=/data/data/com.termux/files/usr/lib/clang/latest/lib/linux",
    "-C", "link-arg=-lclang_rt.builtins-aarch64-android",
]