UbuntuにRustをインストール
インストール
https://doc.rust-lang.org/book/ch01-01-installation.html
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh. "$HOME/.cargo/env"
特に理由がなければ、1
を選択します。
1) Proceed with standard installation (default - just press enter)2) Customize installation3) Cancel installation>
実行
main.rs
を作成します。
fn main() { println!("Hello, world!");}
以下のコマンドでmain.rs
をコンパイルします。
rustc main.rs
以下のコマンドで実行します。
./main
アップデート
rustup update
アンインストール
rustup self uninstall