An entry point is where an executable program begins. In Rust, the main function, written as fn main(), starts the program without receiving arguments. Its code block contains the first statements Rust runs. section 1.6
A minimal Rust entry point
fn main() { println!("Hello, world!"); } Here, fn declares a function, main names the entry point, () shows that it takes no arguments, and the braces hold its code. section 1.6
fn main() {
println!("Hello, world!");
}
Inspect the smallest runnable Rust program and see the entry point connected to output. section 1.6









