mirror of
https://github.com/rizsotto/Bear.git
synced 2026-05-28 00:20:45 +02:00
a2fcd51857
Item #5 consolidated platform-checks but left the build pipeline under-documented: contributors had to read three build.rs files to find out who runs what, and the lld prerequisite was a silent trap. This commit spreads that knowledge across CLAUDE.md files, co-located with the crates each piece belongs to: - New platform-checks/CLAUDE.md: role, post-Item-#5 public API, recipe for adding a probe, scope boundary against the intercept-family list. - New bear-codegen/CLAUDE.md: build-time codegen role; YAML to OUT_DIR via include!(); snapshot-test contract. - New bear-completions/CLAUDE.md: why a separate crate (clap_complete cost), how it's actually invoked (distributor runs it; install.sh only picks up pre-generated files). - Top-level CLAUDE.md: short "Build pipeline" routing section pointing at the per-crate files; "Host requirements" calling out lld as a Linux-only prerequisite; routing table grew three entries. - bear/CLAUDE.md: replaced the narrow "Code generation" subsection with a "Build script" section that also covers INTERCEPT_LIBDIR validation and the rustc-env emissions consumed by installation.rs. - intercept-preload/CLAUDE.md: "Build script duties" listing the cc-shim build, exports list, and link directives, plus a pointer at src/c/shim.c as the source of truth for INTERCEPT_FAMILY. - integration-tests/CLAUDE.md: "Build script duties" describing the executable probes (single vs grouped cfgs) and the ccache-masquerade detection. Side cleanup: dropped the dead `cargo:rustc-cfg=build_cdylib` directive from intercept-preload/build.rs. It was emitted but read by no source -- the existing comment claiming it forced cdylib generation was misleading; cdylib production is decided by Cargo.toml's crate-type, not by the cfg. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>