19. Public API that survives code review
pub boundaries, stable shapes, and pub use—design package surfaces that do not embarrass you in six months.
Public API that survives code review
Treat modules as implementation details until you pub your way into a contract. Your future self—and anyone who did not attend the whiteboard session—will thank you when the refactor stays internal.
This chapter replaces the old flat 06. Public API Idioms page with subsections and sharper teeth.
What you will find here
Section titled “What you will find here”| Section | Topic |
|---|---|
| pub boundaries | What is actually exported. |
| Stable vs internal | Long-term support vs scratch code. |
| Naming and style | Names that scan in review. |
| Package public surface | pckg consumers and api.json. |