# Rust main function


* fn
* main

* There are two types of crates: libraries and executables. The latter can also contain libraries.
* For executable crates we must have a file called `src/main.rs` and it must have a function called `main`.
* This is the most basic definition of a `main` function. It does nothing.

{% embed include file="src/examples/functions/main/src/main.rs" %}


