For agents, on top of README.md, which they read first.

  • The Cargo manifests are generated. Never edit a Cargo.toml outside third-party/ by hand: change the BUCK file (or build/defs.bzl, third-party/Cargo.toml) and run buck2 run //tools/cargo-gen:update.
  • A new first-party buck package must be added to PACKAGES in tools/cargo-gen/BUCK, or it gets no manifest. Buck cannot enumerate packages from inside a build, so that list is the one hand-kept input.
  • third-party/BUCK exports Cargo.toml through buckfile_imports in third-party/reindeer.toml; setting that key drops reindeer's default cargo. rule prefixes, which is why the same file sets them back.
  • Never fix a drift failure by editing the committed file. Run the tool's :update; a hand edit that happens to match will drift again on the next change.