Hello World

Jake_Young·2020년 11월 14일
0

러스트, Rust

목록 보기
2/3
post-thumbnail

1 Hello World

  • 전통적인 Hello World 프로그램의 소스 코드이다.
fn main() {

    println!("Hello World!");
    println!("I'm a Rustacean")
}
  • println! 은 macro 로 문자열을 콘솔에 출력한다.

  • 바이너리는 Rust 컴파일러를 통해 생성된다: rustc.

$ rustc hello.rs

  • rustc 는 실행할 수 있는 hello 바이너리를 생성할 것이다.

$ ./hello
Hello World!

profile
자바스크립트와 파이썬 그리고 컴퓨터와 네트워크

0개의 댓글