Rustの基本を学ぶ。
GUIアプリケーションを作る。
git clone https://github.com/tut-cc/rust-tut && cd rust-tut
nix develop- WSLのインストール
Powershell を管理者権限で開き、wsl --installを実行し、コンピュータを再起動する。参考: https://learn.microsoft.com/ja-jp/windows/wsl/install - NixOS-WSLのインストール
https://github.com/nix-community/NixOS-WSL/releases/tag/2605.7.2 の nixos.wsl をダウンロードして開く。 wsl -d NixOSでNixOS環境に入る。- 以下のコマンドを実行する。
mkdir -p ~/.config/nix echo 'experimental-features = nix-command flakes' > ~/.config/nix/nix.conf sudo systemctl restart nix-daemon
nix run nixpkgs#git clone https://github.com/tut-cc/rust-tut && cd rust-tut && nix developで開発シェルを起動する。
まずは https://rust-lang.org/ja/learn/get-started/ を参考に rustupをインストールしてください。
sudo apt install -y build-essential curl
sudo apt install -y libwayland-client0 libxcursor1 libxi6 libxkbcommon-x11-0 # GUIアプリのライブラリ
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install stable
rustup component add rust-analyzer rust-src clippy rustfmtその後、必要なツールをインストールします。
git clone https://github.com/tut-cc/rust-tut && cd rust-tut
cargo install rust-script