Rust supports multifile projects via the use of modules and files.

Crates

Crates are Rust’s smallest amount of code considered by the compiler. Binary crates are programs compilable into an runnable executable. These must have a main function. Library crates don’t require a main function and don’t compile to an executable.