Rust
DockerでAlpine環境を用意する
- Dockerfile
FROM alpine:latest RUN apk update && apk add curl RUN apk add --no-cache openssl ncurses-libs libgcc
インストール
- rustのインストール
/ # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- defaultの1を入力してEnter
info: downloading installer Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. It will add the cargo, rustc, rustup and other commands to Cargo's bin directory, located at: /root/.cargo/bin This can be modified with the CARGO_HOME environment variable. Rustup metadata and toolchains will be installed into the Rustup home directory, located at: /root/.rustup This can be modified with the RUSTUP_HOME environment variable. This path will then be added to your PATH environment variable by modifying the profile file located at: /root/.profile You can uninstall at any time with rustup self uninstall and these changes will be reverted. Current installation options: default host triple: x86_64-unknown-linux-musl default toolchain: stable profile: default modify PATH variable: yes 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation >
rustコマンドのパスを通す
source $HOME/.cargo/env
Rust関連のコマンドを実行
/ # cargo --version cargo 1.44.1 (88ba85757 2020-06-11) / # rustc --version rustc 1.44.1 (c7087fe00 2020-06-17) / # rustc --version rustc 1.44.1 (c7087fe00 2020-06-17) / # rustup --version rustup 1.21.1 (2019-12-20)
playground
- 環境構築が大変でさっくと検証できる環境を調査する play.rust-lang.org
Rust関連のフレームワーク
- 現時点でStartが多い順です。
Rocket
activx-web
https://github.com/actix/actix-web