CATEGORY: RUST

インストール

RHEL に Rust をインストール

dnf -y install gcc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Mac(Homebrew) に Rust をインストール

brew install rustup-init
rustup-init -y --profile default --no-modify-path
# rustup-init

PATH設定

source $HOME/.cargo/env
rustup self update
rustup update
rustup component add clippy

Docker で使う

new

docker run --rm -v $(pwd):/m -w /m rust:latest cargo init . 

build

docker run --rm -v $(pwd):/m -w /m rust:latest cargo build

run

docker run --rm -v $(pwd):/m -w /m rust:latest cargo run
alias ccargo='docker run --rm -v $(pwd):/m -w /m rust:latest cargo'