donghquinn / rust_practice

Rust Study 러스트 학습

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust And Cargo

  • Cargo is Package Manager of Rust like yarn or npm from javascript
  • All the Dependencies and information will be exist on Cargo.toml like package.json of javascript
  • Rust file is end with .rs

installation(macOS)

 brew install restup-init

Installation(macOS)

initiate

    cargo init hello

Run

  • Can Run rust code by commanding below
    cargo run {filePath/fileName} 

Build

  • Build Rust code by commanding below. It will compile at target/debug.

cargo build {filePath/fileName}

  • Build Rust code with Optimize. It will puts resulting binary in target/release.
  • It would take longer for optimizing than just debugging. But it will run faster.

cargo build {filePath/fileName} --release

Dependencies

  • crates.io is the Rust Community registry. You can find dependencies you looking for.
  • Add into Cargo.toml by commanding below.

cargo add {package name}

About

Rust Study 러스트 학습


Languages

Language:Makefile 54.4%Language:Rust 45.6%