Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.72 KB

File metadata and controls

38 lines (31 loc) · 1.72 KB

Standards

Code-writing standards for the Pyth Crosschain monorepo, for humans and agents. Start here. Read the cross-cutting files first, then the cluster that matches the language you are working in.

Cross-cutting

  • style.md — readability, types, layered architecture, locality of types and functions, no catch-all modules, self-contained comments.
  • testing.md — test-driven development, and why you should never widen an export just to reach it from a test.
  • services.md — writing resilient services: error recovery, benchmarking, logging/metrics/tracing, dependency minimization, running multiple instances.
  • review.md — the code-review checklist reviewers apply to every PR.

Rust

  • rust/AGENTS.md — index for the Rust cluster.
  • rust/style.md — toolchain, formatting, clippy configuration, essential crates.
  • rust/idioms.md — panic discipline, checked/saturating arithmetic, numeric conversions, newtype IDs.
  • rust/errors-and-logging.mdanyhow vs thiserror, preserving error sources, structured logging with tracing.
  • rust/testing.md — the local test gate and #[tokio::test] conventions.

TypeScript