1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-16 23:08:36 +02:00
comprehensive-rust/src/hello-world.md

19 lines
448 B
Markdown
Raw Normal View History

2022-12-21 17:36:30 +02:00
# Hello World!
Let us jump into the simplest possible Rust program, a classic Hello World
program:
```rust
fn main() {
println!("Hello 🌍!");
}
```
What you see:
* Functions are introduced with `fn`.
* Blocks are delimited by curly braces like in C and C++.
* The `main` function is the entry point of the program.
* Rust has hygenic macros, `println!` is an example of this.
* Rust strings can contain Unicode characters, such as emoji.