Rust 설치부터 실행까지 (feat. VScode) - 1
이전부터 학습해보고 싶던 TypeScript, Rust, Golang 중 Rust에 대해 설치부터 실행과정까지 정리해보고자 합니다.
백준의 bubbler님의 도움을 받았습니다.
설치
Rust
https://www.rust-lang.org/tools/install
Install Rust
A language empowering everyone to build reliable and efficient software.
www.rust-lang.org
Window의 경우 해당 사이트에서 exe파일 실행 후, 1번을 입력하여 rust를 설치합니다.
VScode
https://code.visualstudio.com/
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com
해당 사이트를 통해 VSCode를 설치를 진행합니다.
플러그인 설치
VScode의 Rust 플러그인 중, rust-analyzer를 설치를 진행하시면 VScode에서 rust를 컴파일할 수 있습니다.
rust 프로젝트 생성
cargo new main
다음과 같은 명령어를 사용하게 되면 main.rs를 가지고 있는 프로젝트가 생성됩니다.
기본적으로 Hello World!가 출력되는 rust main문이 작성되어진 상태로 만들어집니다.
fn main() {
println!("Hello, world!");
}
해당 시리즈는 https://doc.rust-kr.org/ 의 내용을 공부하면서 정리한 시리즈입니다.