Toyota Way Principles

The APR Cookbook follows Toyota Production System principles applied to software development.

Core Principles

Jidoka (Built-in Quality)

  • Type Safety: Rust's ownership system prevents runtime errors
  • Compile-Time Verification: Models embedded at compile time are validated
  • Automated Testing: Property-based tests verify invariants

Muda (Waste Elimination)

  • Zero Dependencies: Single binary deployment
  • No Python Runtime: Pure Rust inference
  • No CUDA Dependency: Optional GPU with CPU fallback

Heijunka (Leveling)

  • Consistent Recipe Structure: Every example follows the same pattern
  • Predictable APIs: Similar operations have similar interfaces
  • Standard Metrics: All recipes report timing and size metrics

Genchi Genbutsu (Go and See)

  • Edge Deployment: Run models where the data is
  • WASM Support: Browser-based inference
  • Embedded Systems: No heap allocation required

Application to ML

Toyota ConceptML Application
KanbanModel versioning and registry
AndonHealth checks and monitoring
Poka-yokeType-safe tensor shapes
KaizenIncremental model updates

Quality Checklist

Every recipe must pass:

  1. cargo run succeeds (Exit Code 0)
  2. cargo test passes
  3. Deterministic output (verified)
  4. No temp files leaked
  5. Memory usage stable
  6. WASM compatible (if applicable)
  7. Clippy clean
  8. Rustfmt standard
  9. No unwrap() in logic
  10. Proptests pass (100+ cases)