Closed sebglazebrook closed 7 years ago
So here's the Rust way of creating a binary that needs code structure.
You create the main.rs and reference an internal crate inside src/lib.rs and all the library code lives there, so the main.rs sets up the app and that's about it.
main.rs
src/lib.rs
It makes things cleaner and easier to test.
Cool?
So here's the Rust way of creating a binary that needs code structure.
You create the
main.rs
and reference an internal crate insidesrc/lib.rs
and all the library code lives there, so themain.rs
sets up the app and that's about it.It makes things cleaner and easier to test.
Cool?