[build]
# Use Apple's ld (default on macOS) but with faster job scheduling.
# Tantivy + fastembed are memory-heavy to compile; 4 parallel jobs keeps
# peak RSS under ~1.5 GB on a 16 GB machine (8 jobs peaks near 3 GB).
jobs = 4  # M2 8-core — capped at 4 to limit compile-time RSS

[env]
# Each test that builds a Tantivy index allocates 15 MB writer buffer + mmap
# segments. Running all tests in parallel on 16 GB RAM causes OOM (SIGKILL).
# 2 concurrent test threads keeps peak usage well under budget.
RUST_TEST_THREADS = { value = "2", force = false }

[target.aarch64-apple-darwin]
# zld is faster than ld on macOS for large crates; falls back to ld if absent
# rustflags = ["-C", "link-arg=-fuse-ld=zld"]  # uncomment if zld is installed

[net]
retry = 2
