Re-export items in Rust by adding a `pub use` statement in your library root to expose internal modules at the crate level.
Use pub use in your library crate root (src/lib.rs) to re-export an item from a submodule, making it accessible to users of your crate without them needing to know the internal module path.
mod internal {
pub fn helper() {}
}
pub use internal::helper;
This allows external code to call my_crate::helper() instead of my_crate::internal::helper().
Re-exporting with pub use is like putting a shortcut on your desktop for a file buried deep in a folder. It lets you expose a specific function or type to the outside world from a clean, top-level location, hiding the messy internal file structure from your users.