Rust CLI 가이드

22의 명령어를 찾았습니다

cargo new
cargo
새로운 Rust 프로젝트를 생성합니다

예제:

$ cargo new my_project
create
project
new
cargo build
cargo
프로젝트를 컴파일합니다

예제:

$ cargo build --release
compile
build
cargo run
cargo
프로젝트를 컴파일하고 실행합니다

예제:

$ cargo run --bin main
run
execute
cargo test
cargo
테스트를 실행합니다

예제:

$ cargo test --lib
test
testing
cargo add
cargo
의존성을 추가합니다

예제:

$ cargo add serde tokio
dependency
add
package
cargo check
cargo
코드를 컴파일하지 않고 오류만 확인합니다

예제:

$ cargo check
check
validate
cargo clean
cargo
빌드 아티팩트를 삭제합니다

예제:

$ cargo clean
clean
remove
cargo doc
cargo
문서를 생성합니다

예제:

$ cargo doc --open
documentation
docs
cargo publish
cargo
패키지를 crates.io에 게시합니다

예제:

$ cargo publish
publish
crates
cargo install
cargo
바이너리 크레이트를 설치합니다

예제:

$ cargo install ripgrep
install
binary
rustc
rustc
Rust 소스 파일을 컴파일합니다

예제:

$ rustc main.rs
compile
source
rustc --version
rustc
Rust 컴파일러 버전을 확인합니다

예제:

$ rustc --version
version
info
rustc --explain
rustc
에러 코드에 대한 자세한 설명을 봅니다

예제:

$ rustc --explain E0308
error
explain
help
rustc -O
rustc
최적화된 바이너리를 생성합니다

예제:

$ rustc -O main.rs
optimize
performance
rustup update
rustup
Rust 툴체인을 업데이트합니다

예제:

$ rustup update
update
toolchain
rustup install
rustup
특정 툴체인을 설치합니다

예제:

$ rustup install stable
install
toolchain
rustup default
rustup
기본 툴체인을 설정합니다

예제:

$ rustup default stable
default
set
rustup show
rustup
설치된 툴체인을 확인합니다

예제:

$ rustup show
show
list
info
rustup target add
rustup
크로스 컴파일 타겟을 추가합니다

예제:

$ rustup target add wasm32-unknown-unknown
target
cross-compile
rustfmt
tools
Rust 코드를 포맷팅합니다

예제:

$ rustfmt src/main.rs
format
style
cargo fmt
tools
프로젝트 전체를 포맷팅합니다

예제:

$ cargo fmt
format
style
project
cargo clippy
tools
코드 린팅을 수행합니다

예제:

$ cargo clippy -- -D warnings
lint
warnings
suggestions