DataScience
728x90
$ mkdir my-rust-project
$ cd my-rust-project

설치

$ sudo pacman -Sy rustup
 
$ rustup default stable
 
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-12-15, rust version 1.66.0 (69f9c33d7 2022-12-12)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 68.0 MiB /  68.0 MiB (100 %)  22.9 MiB/s in  2s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 19.0 MiB /  19.0 MiB (100 %)  15.3 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 29.7 MiB /  29.7 MiB (100 %)  17.4 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 68.0 MiB /  68.0 MiB (100 %)  19.7 MiB/s in  3s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu installed - rustc 1.66.0 

 

프로젝트 생성

$ mkdir my-rust-project
$ cd my-rust-project
$ cargo init --bin
 

init 결과

     Created binary (application) package
 
├─src
├───main.rs
├─Cargo.lock
└─Cargo.toml

 

프로젝트 실행

$ cargo run
 Compiling my-first-rust-prj v0.1.0 (/(...)/my-first-rust-prj)
    Finished dev [unoptimized + debuginfo] target(s) in 0.26s
     Running `target/debug/my-first-rust-prj`
Hello, world!

'Rust' 카테고리의 다른 글

Tauri 개발  (31) 2023.04.13
Tauri 구조  (135) 2023.04.12
Tauri Project 생성(Sveltekit)  (119) 2023.04.11
TAURI 소개(Electron과 비교) 및 설치  (96) 2023.04.10
Rust 기본 개념  (59) 2023.04.10
profile

DataScience

@Ninestar

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!