Hello, World! example in Rustmain.rs
fn main() {
println!("Hello, World!");
}
Compiling:
> rustc main.rs
generates main.exe on Windows and main on Linux or macOS
Running:
> .\main.exe #Windows
$ ./main #Linux/macOS
main function is the entry point of the programprintln! calls a Rust macro, not a function