플레이그라운드

The Rust Playground provides an easy way to run short Rust programs, and is the basis for the examples and exercises in this course. Try running the “hello-world” program it starts with. It comes with a few handy features:

  • ’도구’에서 rustfmt 옵션을 사용하여 ‘표준’ 방식으로 코드 형식을 지정합니다.

  • Rust에는 코드를 생성하기 위한 두 가지 기본 ’프로필’이 있습니다. 디버그(추가 런타임 검사, 최적화 감소) 및 출시(더 적은 런타임 검사, 최적화 증가)입니다. 상단의 ’디버그’에서 액세스할 수 있습니다.

  • 관심이 있으시면 ‘…’ 아래의 ’ASM’을 사용해 생성된 어셈블리 코드를 확인하세요.

This slide should take about 2 minutes.

As students head into the break, encourage them to open up the playground and experiment a little. Encourage them to keep the tab open and try things out during the rest of the course. This is particularly helpful for advanced students who want to know more about Rust’s optimizations or generated assembly.