50% 할인 모든 플랜, 기간 한정. 시작 가격 $2.48/mo
Rust

Rust

Rust는 시스템 프로그래밍 언어입니다. 메모리 안전성을 보장하고, 가비지 컬렉터 없이 C만큼 빠릅니다. Stack Overflow에서 8년 연속 가장 사랑받는 언어로 선정되었으며, AWS, Microsoft, Cloudflare, Discord, Linux 커널에서 활용되고 있습니다. 고성능 시스템 소프트웨어의 새로운 기본 언어입니다.

버전

최신

운영 체제

Ubuntu Server 24.04 LTS

최소 RAM

1 GB

IP 유형

IPV4,IPV6

접근

자격증명:

  • 사용자: ferris
  • 암호: (저장됨 /root/.cloudzy-creds)

SSH로 서버에 root 접속 후, Rust 사용자로 전환하세요:

su - ferris

중요 디렉토리

  • /home/ferris/.cargo/ → Cargo 바이너리 (cargo, 설치된 상자)
  • /home/ferris/.rustup/ → Rust 툴체인 및 컴포넌트
  • /home/ferris/ → 작업공간 (프로젝트가 저장되는 위치)

유용한 명령어

설치 확인:

cargo --version
rustc --version

Rust 업데이트:

rustup update

추가 도구 설치/업데이트 (예: 린터):

rustup component add clippy

Rust 제거:

rustup self uninstall

프로젝트 빌드:

cargo build

프로젝트 실행:

cargo run

테스트 실행:

cargo test

프로젝트 문서 빌드:

cargo doc --open

crates.io에 라이브러리 배포:

cargo publish

간단한 Rust 애플리케이션

새 프로젝트 생성:

cargo new hello-rust
cd hello-rust

기본 프로그램 실행:

cargo run

CLI로 의존성 추가:

cargo add ferris-says

빌드하기 (Cargo가 의존성을 자동으로 설치합니다):

cargo build

이 과정에서 다음 파일도 생성됩니다 Cargo.lock (의존성 버전 잠금 파일).

편집 src/main.rs:

use ferris_says::say;
use std::io::{stdout, BufWriter};


fn main() {
    let stdout = stdout();
    let message = String::from("Hello fellow Rustaceans!");
    let width = message.chars().count();


    let mut writer = BufWriter::new(stdout.lock());
    say(&message, width, &mut writer).unwrap();
}

실행:

cargo run

개발 도구 더 보기

관련 앱.

지금 Rust 배포하기 월 $2.48부터.