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 Concept | ML Application |
|---|---|
| Kanban | Model versioning and registry |
| Andon | Health checks and monitoring |
| Poka-yoke | Type-safe tensor shapes |
| Kaizen | Incremental model updates |
Quality Checklist
Every recipe must pass:
cargo runsucceeds (Exit Code 0)cargo testpasses- Deterministic output (verified)
- No temp files leaked
- Memory usage stable
- WASM compatible (if applicable)
- Clippy clean
- Rustfmt standard
- No
unwrap()in logic - Proptests pass (100+ cases)