Rust 튜토리얼 목차

Chapter 0 - 마무리

Rust 소스코드는 .rs 확장자를 가집니다.

rust
fn main() { println!("Hello, world!"); }

위 코드는 가장 간단한 Rust 프로그램입니다.

main 함수를 정의하고, println! 매크로를 사용하여 "Hello, world!"를 출력하도록 되어 있습니다.

위 코드를 hello.rs라는 이름으로 저장한 뒤, 터미널에서 다음과 같은 명령어를 입력해보세요.

bash
$ rustc hello.rs $ ./hello $ Hello, world! (stdout)

Google evcxr - Rust REPL

Rust Tutorial