Rust 개발 환경 구축

·2023년 9월 14일
0

rust

목록 보기
1/1

설치 환경

  • Windows 10 Home

설치 목록

  • Rust 개발 도구 (rustc, cargo ..)
  • Visual Studio
  • Visual Studio Code

✔ 참고
참고 블로그
MS: NWindows에서 Rust에 대한 개발 환경 설정



Rust 설치

1. 러스트 설치 파일 다운받기
- https://rustup.rs/ 에서 rustup-init.ex 파일을 다운받는다.

2. 설치 파일 실행 및 visual studio 설치
- Windows에서 Rust를 사용하려면 C++ 빌드 도구가 필요하다.
- Microsoft C++ Build Tools를 다운로드해도 되고, 간단하게 Microsoft Visual Studio만 설치(권장)해도 된다.
- 파일을 실행시키면 옵션을 선택할 수 있는데, 나는 visual studio를 설치하기 위해 1번으로 선택했다.
- pc를 다시 시작한다.
- rustup-init.exe 를 다시 실행하여 rust 설치를 계속 진행한다. 나는 default인 1번으로 선택했다.
("cargo", "clippy", "rust-docs" 등을 설치하게 된다.)

3. rust 설치 상태 확인

C:\Users\mypc>rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.72.0 (5680fa18f 2023-08-23)`

4. rustup을 이용하여 rust-toolchain 설치
- stable, beta, nightly 채널 중 beta로 설치를 진행했다.

C:\Users\mypc>rustup toolchain install beta
info: syncing channel updates for 'beta-x86_64-pc-windows-msvc'
info: latest update on 2023-09-10, rust version 1.73.0-beta.5 (ea9959354 2023-09-09)
info: downloading component 'cargo'
  5.6 MiB /   5.6 MiB (100 %)   4.9 MiB/s in  1s ETA:  0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 13.8 MiB /  13.8 MiB (100 %)   4.8 MiB/s in  3s ETA:  0s
info: downloading component 'rust-std'
 18.3 MiB /  18.3 MiB (100 %)   4.8 MiB/s in  3s ETA:  0s
info: downloading component 'rustc'
 58.6 MiB /  58.6 MiB (100 %)   1.9 MiB/s in 16s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 13.8 MiB /  13.8 MiB (100 %)   3.2 MiB/s in  3s ETA:  0s
info: installing component 'rust-std'
info: installing component 'rustc'
 58.6 MiB /  58.6 MiB (100 %)  22.6 MiB/s in  2s ETA:  0s
info: installing component 'rustfmt'
  beta-x86_64-pc-windows-msvc installed - rustc 1.73.0-beta.5 (ea9959354 2023-09-09)
info: checking for self-update

5. rustc 설치 확인

C:\Users\1212s>rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.72.0 (5680fa18f 2023-08-23)`


VSCode 설치

profile
Travel | Developer

0개의 댓글