文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== Rust 関連 ====== {{:rust:rust_programming_language_black_logo.svg?200|Rust ロゴ}}\\ **Rust** (ラスト) は、性能、メモリ安全性、安全な並行性を目指して設計されたマルチパラダイムのプログラミング言語である。C 言語、C++ に代わるシステムプログラミング言語を目指しており、構文的にはC++に似ているが、「ボローチェッカー」(borrow checker) で参照の有効性を検証することによってメモリ安全性を保証できる。Rust はガベージコレクションなしでのメモリ安全性を達成しており、必要な場面で参照カウントを使うこともできる。\\ 出典: [[wwjp>Rust_(プログラミング言語)|Rust (プログラミング言語) - Wikiwand]]\\ 本家: [[https://www.rust-lang.org/ja/|Rustプログラミング言語]] - rust-lang.org\\ [[https://rust-jp.rs|Rust の日本語情報]] - rust-jp.rs\\ ソースコード: [[git>rust-lang|The Rust Programming Language]] [[gtr>https://github.com/rust-lang/rust|翻訳]]\\ [[git>rust-lang/rust|GitHub - rust-lang/rust: Empowering everyone to build reliable and efficient software.]]\\ ドキュメント: [[https://doc.rust-lang.org/book/|The Rust Programming Language - The Rust Programming Language]] [[gtr>https://doc.rust-lang.org/book/|翻訳]] (公式英語) - rust-lang.org\\ [[https://www.rust-lang.org/ja/learn|Rustを学ぶ/Rustプログラミング言語]] - rust-lang.org\\ [[https://doc.rust-jp.rs/|Rustの日本語ドキュメント/Japanese Docs for Rust]] - rust-jp.rs\\ [[https://doc.rust-jp.rs/book-ja/|The Rust Programming Language 日本語版 - The Rust Programming Language 日本語版]] (日本語訳) - rust-jp.rs\\ [[https://doc.rust-jp.rs/book-ja-pdf/book.pdf|The Rust Programming Language 日本語版 (PDF版)]] (日本語訳) - rust-jp.rs\\ [[https://doc.rust-jp.rs/rust-by-example-ja/index.html|Introduction - Rust By Example 日本語版]] - rust-jp.rs\\ [[https://doc.rust-lang.org/rust-by-example/index.html|Introduction - Rust By Example]] - rust-lang.org\\ その他: [[https://rust-lang.github.io/rfcs/introduction.html|Introduction - The Rust RFC Book]] [[gtr>https://rust-lang.github.io/rfcs/introduction.html|翻訳]]\\ ===== 関連文献 ===== [[:python:jupyterlab:jupyterlab_and_rust|JupyterLab + Rust 開発環境の構築]]\\ ===== インストール ===== 参考:\\ [[https://doc.rust-jp.rs/book-ja/ch01-01-installation.html|インストール - The Rust Programming Language 日本語版]]\\ [[https://forge.rust-lang.org/infra/other-installation-methods.html|Other Installation Methods - Rust Forge]]\\ ==== Linux ==== === Fedora (Rust 公式から...) === 公式(非公式日本語翻訳): [[https://doc.rust-jp.rs/book-ja/ch01-01-installation.html#linux%E3%81%A8macos%E3%81%ABrustup%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B|インストール - The Rust Programming Language 日本語版]] より\\ **cargo**、**rustc**、および、**rustup**などもインストールされる😃\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>curl</b> <b class=HIK>--proto</b> '=https' <b class=HIK>--tlsv1.2 -sSf</b> https://sh.rustup.rs | <b class=HIY>sh</b> </pre></html></WRAP> <WRAP color_result_long><html><pre> <b class=BOLD>info:</b> downloading installer <b class=BOLD>Welcome to Rust!</b> This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. Rustup metadata and toolchains will be installed into the Rustup home directory, located at: /home/tomoyan/.rustup This can be modified with the RUSTUP_HOME environment variable. The Cargo home directory is located at: /home/tomoyan/.cargo This can be modified with the CARGO_HOME environment variable. The <b class=BOLD>cargo</b>, <b class=BOLD>rustc</b>, <b class=BOLD>rustup</b> and other commands will be added to Cargo's bin directory, located at: /home/tomoyan/.cargo/bin This path will then be added to your <b class=BOLD>PATH</b> environment variable by modifying the profile files located at: /home/tomoyan/.profile /home/tomoyan/.bash_profile /home/tomoyan/.bashrc You can uninstall at any time with <b class=BOLD>rustup self uninstall</b> and these changes will be reverted. Current installation options: default host triple: <b class=BOLD>x86_64-unknown-linux-gnu</b> default toolchain: <b class=BOLD>stable (default)</b> profile: <b class=BOLD>default</b> modify PATH variable: <b class=BOLD>yes</b> 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation > <b class=YEL>Enter で続行</b> <b class=BOLD>info:</b> profile set to 'default' <b class=BOLD>info:</b> default host triple is x86_64-unknown-linux-gnu <b class=BOLD>info:</b> syncing channel updates for 'stable-x86_64-unknown-linux-gnu' <b class=BOLD>info:</b> latest update on 2023-03-28, rust version 1.68.2 (9eb3afe9e 2023-03-27) <b class=BOLD>info:</b> downloading component 'cargo' 6.7 MiB / 6.7 MiB (100 %) 2.2 MiB/s in 3s ETA: 0s <b class=BOLD>info:</b> downloading component 'clippy' 2.4 MiB / 2.4 MiB (100 %) 951.7 KiB/s in 2s ETA: 0s <b class=BOLD>info:</b> downloading component 'rust-docs' 19.5 MiB / 19.5 MiB (100 %) 4.0 MiB/s in 4s ETA: 0s <b class=BOLD>info:</b> downloading component 'rust-std' 29.9 MiB / 29.9 MiB (100 %) 4.9 MiB/s in 6s ETA: 0s <b class=BOLD>info:</b> downloading component 'rustc' 68.1 MiB / 68.1 MiB (100 %) 4.3 MiB/s in 15s ETA: 0s <b class=BOLD>info:</b> downloading component 'rustfmt' <b class=BOLD>info:</b> installing component 'cargo' <b class=BOLD>info:</b> installing component 'clippy' <b class=BOLD>info:</b> installing component 'rust-docs' 19.5 MiB / 19.5 MiB (100 %) 5.5 MiB/s in 3s ETA: 0s <b class=BOLD>info:</b> installing component 'rust-std' 29.9 MiB / 29.9 MiB (100 %) 7.3 MiB/s in 4s ETA: 0s <b class=BOLD>info:</b> installing component 'rustc' 68.1 MiB / 68.1 MiB (100 %) 9.1 MiB/s in 7s ETA: 0s <b class=BOLD>info:</b> installing component 'rustfmt' <b class=BOLD>info:</b> default toolchain set to 'stable-x86_64-unknown-linux-gnu' <b class="BOLD HIG">stable-x86_64-unknown-linux-gnu installed</b> - rustc 1.68.2 (9eb3afe9e 2023-03-27) <b class=BOLD>Rust is installed now. Great!</b> To get started you may need to restart your current shell. This would reload your <b class=BOLD>PATH</b> environment variable to include Cargo's bin directory ($HOME/.cargo/bin). To configure your current shell, run: source "$HOME/.cargo/env" </pre></html></WRAP> </WRAP> <WRAP group> <WRAP column half mincode><code> warning: it looks like you have an existing installation of Rust at: warning: /usr/bin warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first. warning: Otherwise you may have confusion unless you are careful with your PATH warning: If you are sure that you want both rustup and your already installed Rust warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes warning: or pass `-y' to ignore all ignorable checks. </code></WRAP> <WRAP column half mincode><code> Rust の既存のインストールがあるようです: /usr/bin rustup は Rust と一緒にインストールしないでください。最初に既存の Rust をアンインストールしてください。 そうしないと、PATH に注意しない限り、混乱する可能性があります。 rustup とすでにインストールされているRustの両方が必要な場合は、`y' または `yes' と応答するか、RUSTUP_INIT_SKIP_PATH_CHECK を yes に設定するか、`-y' を渡してすべてのチェックを無視できます。 </code></WRAP> </WRAP> <WRAP group> <WRAP column half mincode><code> Welcome to Rust! This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. Rustup metadata and toolchains will be installed into the Rustup home directory, located at: /home/tomoyan/.rustup This can be modified with the RUSTUP_HOME environment variable. The Cargo home directory located at: /home/tomoyan/.cargo This can be modified with the CARGO_HOME environment variable. The cargo, rustc, rustup and other commands will be added to Cargo's bin directory, located at: /home/tomoyan/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile files located at: /home/tomoyan/.profile /home/tomoyan/.bash_profile /home/tomoyan/.bashrc You can uninstall at any time with rustup self uninstall and these changes will be reverted. </code></WRAP> <WRAP column half mincode><code> Rust へようこそ! これにより、Rust プログラミング言語の公式コンパイラとそのパッケージマネージャーである Cargo がダウンロードおよびインストールされます。 Rustupメタデータとツールチェーンは、次の場所にあるRustupホームディレクトリにインストールされます。 /home/tomoyan/.rustup これは、RUSTUP_HOME 環境変数を使用して変更できます。 次の場所にある Cargo ホームディレクトリ: /home/tomoyan/.cargo これは、CARGO_HOME 環境変数を使用して変更できます。 cargo、rustc、rustup、およびその他のコマンドは、次の場所にある Cargo の bin ディレクトリに追加されます。 /home/tomoyan/.cargo/bin このパスは、次の場所にあるプロファイルファイルを変更することにより、PATH 環境変数に追加されます。 /home/tomoyan/.profile /home/tomoyan/.bash_profile /home/tomoyan/.bashrc rustup セルフアンインストールを使用すると、いつでもアンインストールでき、これらの変更は元に戻されます。 </code></WRAP> </WRAP> **.bashrc** に自動ロードの設定を追加する。\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>echo</b> 'source $HOME/.cargo/env' >> ~/.bashrc </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> </WRAP> **bash** の設定を反映させる。\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>.</b> ~/.bashrc </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> </WRAP> **動作確認**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> <b class=HIK>--version</b> </pre></html></WRAP> <WRAP color_result><html><pre> rustup 1.25.2 (17db695f1 2023-02-01) <b class=BOLD>info:</b> This is the version for the rustup toolchain manager, not the rustc compiler. <b class=BOLD>info:</b> The currently active `rustc` version is `rustc 1.68.2 (9eb3afe9e 2023-03-27)` </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustc</b> <b class=HIK>--version</b> </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.68.2 (9eb3afe9e 2023-03-27) </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cargo</b> <b class=HIK>--version</b> </pre></html></WRAP> <WRAP color_result><html><pre> cargo 1.68.2 (6feb7c9cf 2023-03-26) </pre></html></WRAP> </WRAP> **実行ファイルのパス確認**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>which</b> rustup rustc cargo </pre></html></WRAP> <WRAP color_result><html><pre> ~/.cargo/bin/rustup ~/.cargo/bin/rustc ~/.cargo/bin/cargo </pre></html></WRAP> </WRAP> こちらは Fedora のリポジトリからインストールしたコマンドである🤔\\ <WRAP color_term> <WRAP color_command><html><pre> $ /bin/rustc --version && /bin/cargo --version </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.63.0 (Fedora 1.63.0-1.fc36) cargo 1.63.0 </pre></html></WRAP> </WRAP> === Fedora (RPM パッケージから...) === <wrap em>この手順はスキップして構わない。Rust 公式からのインストールで開発環境は整う🤔</wrap>\\ **cargo**、**rustc** はインストールされるが、**rustup** が存在しない...🤔\\ <WRAP color_term> <WRAP color_command><html><pre> $ sudo dnf install rust cargo </pre></html></WRAP> <WRAP color_result_long><html><pre> メタデータの期限切れの最終確認: 4:36:48 時間前の 2022年08月31日 22時35分04秒 に実施しました。 依存関係が解決しました。 ============================================================================================================== パッケージ アーキテクチャー バージョン リポジトリー サイズ ============================================================================================================== インストール: <b class=GRN>cargo</b> x86_64 1.63.0-1.fc36 updates 4.6 M <b class=GRN>rust</b> x86_64 1.63.0-1.fc36 updates 25 M 依存関係のインストール: <b class=GRN>rust-std-static</b> x86_64 1.63.0-1.fc36 updates 27 M トランザクションの概要 ============================================================================================================== インストール 3 パッケージ ダウンロードサイズの合計: 56 M インストール後のサイズ: 220 M これでよろしいですか? [y/N]: y パッケージのダウンロード: (1/3): cargo-1.63.0-1.fc36.x86_64.rpm 3.7 MB/s | 4.6 MB 00:01 (2/3): rust-std-static-1.63.0-1.fc36.x86_64.rpm 2.7 MB/s | 27 MB 00:09 (3/3): rust-1.63.0-1.fc36.x86_64.rpm 1.7 MB/s | 25 MB 00:14 -------------------------------------------------------------------------------------------------------------- 合計 3.4 MB/s | 56 MB 00:16 トランザクションの確認を実行中 トランザクションの確認に成功しました。 トランザクションのテストを実行中 トランザクションのテストに成功しました。 トランザクションを実行中 準備 : 1/1 インストール中 : rust-std-static-1.63.0-1.fc36.x86_64 1/3 インストール中 : rust-1.63.0-1.fc36.x86_64 2/3 インストール中 : cargo-1.63.0-1.fc36.x86_64 3/3 scriptletの実行中: cargo-1.63.0-1.fc36.x86_64 3/3 検証 : cargo-1.63.0-1.fc36.x86_64 1/3 検証 : rust-1.63.0-1.fc36.x86_64 2/3 検証 : rust-std-static-1.63.0-1.fc36.x86_64 3/3 インストール済み: cargo-1.63.0-1.fc36.x86_64 rust-1.63.0-1.fc36.x86_64 rust-std-static-1.63.0-1.fc36.x86_64 完了しました! </pre></html></WRAP> </WRAP> **動作確認**\\ <WRAP color_term> <WRAP color_command><html><pre> $ rustc --version </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.63.0 (Fedora 1.63.0-1.fc36) </pre></html></WRAP> <WRAP color_command><html><pre> $ cargo --version </pre></html></WRAP> <WRAP color_result><html><pre> cargo 1.63.0 </pre></html></WRAP> </WRAP> === DietPi (Raspberry Pi Zero WH) === 公式: [[https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-linux-or-macos|Installation - The Rust Programming Language]] [[gtr>https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-linux-or-macos|翻訳]]\\ 非公式日本語: [[https://doc.rust-jp.rs/book-ja/ch01-01-installation.html#linux%E3%81%A8macos%E3%81%ABrustup%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B|インストール - The Rust Programming Language 日本語版]]\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>curl</b> <b class=HIK>--proto</b> '=https' <b class=HIK>--tlsv1.2 -sSf</b> https://sh.rustup.rs | sh </pre></html></WRAP> <WRAP color_result_long><html><pre> <b class=BOLD>info:</b> downloading installer <b class=BOLD>Welcome to Rust!</b> This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. Rustup metadata and toolchains will be installed into the Rustup home directory, located at: /home/dietpi/.rustup This can be modified with the RUSTUP_HOME environment variable. The Cargo home directory is located at: /home/dietpi/.cargo This can be modified with the CARGO_HOME environment variable. The <b class=BOLD>cargo, rustc, rustup</b> and other commands will be added to Cargo's bin directory, located at: /home/dietpi/.cargo/bin This path will then be added to your <b class=BOLD>PATH</b> environment variable by modifying the profile files located at: /home/dietpi/.profile /home/dietpi/.bashrc You can uninstall at any time with <b class=BOLD>rustup self uninstall</b> and these changes will be reverted. Current installation options: default host triple: <b class=BOLD>arm-unknown-linux-gnueabihf</b> default toolchain: <b class=BOLD>stable (default)</b> profile: <b class=BOLD>default</b> modify PATH variable: <b class=BOLD>yes</b> 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation > <b class=DiYE>-> Enter を入力</b> <b class=BOLD>info:</b> profile set to 'default' <b class=BOLD>info:</b> default host triple is arm-unknown-linux-gnueabihf <b class=BOLD>info:</b> syncing channel updates for 'stable-arm-unknown-linux-gnueabihf' <b class=BOLD>info:</b> latest update on 2023-08-03, rust version 1.71.1 (eb26296b5 2023-08-03) <b class=BOLD>info:</b> downloading component 'cargo' 6.5 MiB / 6.5 MiB (100 %) 609.6 KiB/s in 10s ETA: 0s <b class=BOLD>info:</b> downloading component 'clippy' 2.2 MiB / 2.2 MiB (100 %) 444.4 KiB/s in 6s ETA: 0s <b class=BOLD>info:</b> downloading component 'rust-docs' 13.6 MiB / 13.6 MiB (100 %) 552.9 KiB/s in 29s ETA: 0s <b class=BOLD>info:</b> downloading component 'rust-std' 23.0 MiB / 23.0 MiB (100 %) 424.2 KiB/s in 50s ETA: 0s <b class=BOLD>info:</b> downloading component 'rustc' 73.0 MiB / 73.0 MiB (100 %) 443.7 KiB/s in 2m 9s ETA: 0s <b class=BOLD>info:</b> downloading component 'rustfmt' 2.1 MiB / 2.1 MiB (100 %) 490.6 KiB/s in 4s ETA: 0s <b class=BOLD>info:</b> installing component 'cargo' 6.5 MiB / 6.5 MiB (100 %) 1.5 MiB/s in 4s ETA: 0s <b class=BOLD>info:</b> installing component 'clippy' 2.2 MiB / 2.2 MiB (100 %) 1.6 MiB/s in 2s ETA: 0s <b class=BOLD>info:</b> installing component 'rust-docs' 13.6 MiB / 13.6 MiB (100 %) 398.4 KiB/s in 1m 19s ETA: 0s <b class=BOLD>info:</b> installing component 'rust-std' 23.0 MiB / 23.0 MiB (100 %) 1.5 MiB/s in 23s ETA: 0s <b class=BOLD>info:</b> installing component 'rustc' 73.0 MiB / 73.0 MiB (100 %) 940.8 KiB/s in 58s ETA: 0s <b class=BOLD>info:</b> installing component 'rustfmt' 2.1 MiB / 2.1 MiB (100 %) 1.6 MiB/s in 2s ETA: 0s <b class=BOLD>info:</b> default toolchain set to 'stable-arm-unknown-linux-gnueabihf' <b class="BOLD GRN">stable-arm-unknown-linux-gnueabihf installed</b> - rustc 1.71.1 (eb26296b5 2023-08-03) <b class=BOLD>Rust is installed now. Great!</b> To get started you may need to restart your current shell. This would reload your PATH environment variable to include Cargo's bin directory ($HOME/.cargo/bin). To configure your current shell, run: source "$HOME/.cargo/env" </pre></html></WRAP> </WRAP> <WRAP mincode> <code bash $HOME/.cargo/env> #!/bin/sh # rustup shell setup # affix colons on either side of $PATH to simplify matching case ":${PATH}:" in *:"$HOME/.cargo/bin":*) ;; *) # Prepending path in case a system-installed rustc needs to be overridden export PATH="$HOME/.cargo/bin:$PATH" ;; esac </code> </WRAP> **.profile** に自動ロードの設定を追加する。\\ <WRAP color_term> <WRAP color_command><html><pre> $ echo 'source $HOME/.cargo/env' >> ~/.profile </pre></html></WRAP> <WRAP color_result> </WRAP> </WRAP> **動作確認**\\ <WRAP color_term> <WRAP color_command><html><pre> $ rustc --version </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.61.0 (fe5b13d68 2022-05-18) </pre></html></WRAP> <WRAP color_command><html><pre> $ cargo --version </pre></html></WRAP> <WRAP color_result><html><pre> cargo 1.61.0 (a028ae42f 2022-04-29) </pre></html></WRAP> </WRAP> <html><code>~/.cargo/bin/</code></html> の内容🤔\\ <WRAP color_term> <WRAP color_command><html><pre> $ ls -l ~/.cargo/bin/ </pre></html></WRAP> <WRAP color_result><html><pre> total 181136 -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>cargo</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>cargo-clippy</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>cargo-fmt</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>cargo-miri</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>clippy-driver</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rls</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rust-gdb</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rust-lldb</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rustc</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rustdoc</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rustfmt</b> -rwxr-xr-x 12 dietpi dietpi 13974212 Jun 8 08:49 <b class=GRN>rustup</b> -rwxr-xr-x 1 dietpi dietpi 17775060 Jun 16 19:34 <b class=GRN>sccache</b> </pre></html></WRAP> </WRAP> ==== Windows ==== Visual Studio、Visual Studio Code を利用する場合は [[https://learn.microsoft.com/ja-jp/windows/dev-environment/rust/setup|Windows で Rust 用の開発環境を設定する]] も参照。\\ \\ 以下は [[windows:scoop|Scoop]] によるインストール手順です🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>scoop</b> install rustup </pre></html></WRAP> <WRAP color_result><html><pre> Installing 'rustup' (1.26.0) [64bit] from main bucket rustup-init.exe (8.2 MB) [====================================================================================] 100% Checking hash of <b class=CYN>rustup-init.exe</b> ... <b class=GRN>ok.</b> Running installer script... Linking ~\scoop\apps\rustup\current => ~\scoop\apps\rustup\1.26.0 Persisting .cargo Persisting .rustup <b class=GRN>'rustup' (1.26.0) was installed successfully!</b> Notes ----- This package defaults to using the MSVC toolchain in new installs; use "rustup set default-host" to configure it (existing installs may be using the GNU toolchain by default) According to https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-windows Microsoft C++ Build Tools is needed and can be downloaded here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ When installing build tools, these two components should be selected: - MSVC - VS C++ x64/x86 build tools - Windows SDK </pre></html></WRAP> </WRAP> <WRAP group> <WRAP left 43% mincode><code> Notes ----- This package defaults to using the MSVC toolchain in new installs; use "rustup set default-host" to configure it (existing installs may be using the GNU toolchain by default) According to https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-windows Microsoft C++ Build Tools is needed and can be downloaded here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ When installing build tools, these two components should be selected: - MSVC - VS C++ x64/x86 build tools - Windows SDK </code></WRAP> <WRAP left 43% mincode><code> ノート ----- このパッケージは、新規インストールではデフォルトで MSVC ツールチェーンを使用します。 "rustup set default-host" を使用して設定します (既存のインストールではデフォルトで GNU ツールチェーンが使用されている可能性があります) https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-windows によると Microsoft C++ Build Tools が必要で、ここからダウンロードできます: https://visualstudio.microsoft.com/visual-cpp-build-tools/ ビルド ツールをインストールするときは、次の 2 つのコンポーネントを選択する必要があります: - MSVC - VS C++ x64/x86 build tools - Windows SDK </code></WRAP> </WRAP> <WRAP group> <WRAP left 43% mincode><code> To get started you need Cargo's bin directory (C:\Users\tomoyan\scoop\persist \rustup\.cargo\bin) in your PATH environment variable. This has not been done automatically. </code></WRAP> <WRAP left 43% mincode><code> 開始するには、PATH 環境変数に Cargo の bin ディレクトリ (C:\Users\tomoyan\scoop\persist\rustup\.cargo\bin) が必要です。 これは自動的には行われません。 </code></WRAP> </WRAP> <WRAP group> <WRAP left 43% mincode><code> Notes ----- To use the MSVC ABI without Visual Studio 2015 (or higher) installed, you will need the Visual Studio 2017 Build Tools: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017 </code></WRAP> <WRAP left 43% mincode><code> Visual Studio 2015 (またはそれ以降) をインストールせずにMSVC ABIを使用するには、Visual Studio 2017ビルドツールが必要です。 https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017 </code></WRAP> </WRAP> **環境変数の設定**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cat</b> ~\scoop\buckets\main\bucket\rustup.json </pre></html></WRAP> <WRAP color_result_long><html><pre> { "version": "1.26.0", "description": "Manage multiple rust installations with ease", "homepage": "https://rustup.rs", "license": "MIT|Apache-2.0", "notes": [ "This package defaults to using the MSVC toolchain in new installs; use \"rustup set default-host\" to configure it", "(existing installs may be using the GNU toolchain by default)", "According to https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-windows", "Microsoft C++ Build Tools is needed and can be downloaded here: https://visualstudio.microsoft.com/visual-cpp-build-tools/", "When installing build tools, these two components should be selected:", "- MSVC - VS C++ x64/x86 build tools", "- Windows SDK" ], "architecture": { "64bit": { "url": "https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-pc-windows-msvc/rustup-init.exe", "hash": "365d072ac4ef47f8774f4d2094108035e2291a0073702db25fa7797a30861fc9" }, "32bit": { "url": "https://static.rust-lang.org/rustup/archive/1.26.0/i686-pc-windows-msvc/rustup-init.exe", "hash": "3fcfaf0018c12b96c49dc7e13e8638bd8de686ab27dd14238c3f11d0a936c003" } }, "installer": { "script": [ "[Environment]::SetEnvironmentVariable('CARGO_HOME', \"$persist_dir\\.cargo\", 'Process')", "[Environment]::SetEnvironmentVariable('RUSTUP_HOME', \"$persist_dir\\.rustup\", 'Process')", "Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args @('-y', '--no-modify-path') | Out-Null" ] }, "env_add_path": ".cargo\\bin", "env_set": { "CARGO_HOME": "$persist_dir\\.cargo", "RUSTUP_HOME": "$persist_dir\\.rustup" }, "persist": [ ".cargo", ".rustup" ], "checkver": { "url": "https://raw.githubusercontent.com/rust-lang-nursery/rustup.rs/master/Cargo.toml", "regex": "version = \"([\\d.]+)\"" }, "autoupdate": { "architecture": { "64bit": { "url": "https://static.rust-lang.org/rustup/archive/$version/x86_64-pc-windows-msvc/rustup-init.exe" }, "32bit": { "url": "https://static.rust-lang.org/rustup/archive/$version/i686-pc-windows-msvc/rustup-init.exe" } }, "hash": { "url": "$url.sha256" } } } </pre></html></WRAP> </WRAP> インストーラはレジストリのPath 環境変数を自動で設定していないので、PowerShell を再起動すると消える🤔\\ PowerShell を終了する前にレジストリのユーザー環境変数に Path を設定するには以下のコマンドを実行する😉\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> [Environment]::SetEnvironmentVariable(<b class=HIB>'Path'</b>, <b class=GRN>$env:CARGO_HOME</b> + <b class=HIB>'\bin;'</b> + <b class=GRN>$env:Path</b>, <b class=HIB>'User'</b>) </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> </WRAP> **動作確認**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustc</b> <b class=HIK>--version</b> </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.71.0 (8ede3aae2 2023-07-12) </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cargo</b> <b class=HIK>--version</b> </pre></html></WRAP> <WRAP color_result><html><pre> cargo 1.71.0 (cfd3bbd8f 2023-06-08) </pre></html></WRAP> </WRAP> ==== Android (Termux!) ==== [[git>rust-lang/rustup/issues/2872|Can not install on android - target 'aarch64-linux-android' not found in channel. · Issue #2872 · rust-lang/rustup]]🤔\\ [[git>TermuxArch/TermuxArch|TermuxArch/TermuxArch: Experience the pleasure of the Linux command prompt in Android, Chromebook, Fire OS and Windows on smartphone, smartTV, tablet and wearable https://termuxarch.github.io/TermuxArch/]] を参照🤔\\ TermuxArch で rustup を使用するとのことですが試せてません😅\\ <WRAP color_term> <WRAP color_result><html><pre> Welcome to Termux! Wiki: https://wiki.termux.com Community forum: https://termux.com/community Gitter chat: https://gitter.im/termux/termux IRC channel: #termux on freenode Working with packages: * Search packages: pkg search <query> * Install a package: pkg install <package> * Upgrade packages: pkg upgrade Subscribing to additional repositories: * Root: pkg install root-repo * Unstable: pkg install unstable-repo * X11: pkg install x11-repo Report issues at https://termux.com/issues </pre></html></WRAP> <WRAP color_command><html><pre> $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh </pre></html></WRAP> <WRAP color_result_long><html><pre> <b class=BOLD>info:</b> downloading installer <b class=RED>error:</b> $HOME differs from euid-obtained home directory: you may be using sudo <b class=RED>error:</b> $HOME directory: /data/data/com.termux/files/home <b class=RED>error:</b> euid-obtained home directory: /data <b class=RED>error:</b> if this is what you want, restart the installation with `-y' <b class=BOLD>Welcome to Rust!</b> This will download and install the official compiler for the Rust programming language, and its package manager, Cargo. Rustup metadata and toolchains will be installed into the Rustup home directory, located at: /data/data/com.termux/files/home/.rustup This can be modified with the RUSTUP_HOME environment variable. The Cargo home directory is located at: /data/data/com.termux/files/home/.cargo This can be modified with the CARGO_HOME environment variable. The <b class=BOLD>cargo</b>, <b class=BOLD>rustc</b>, <b class=BOLD>rustup</b> and other commands will be added to Cargo's bin directory, located at: /data/data/com.termux/files/home/.cargo/bin This path will then be added to your PATH environment variable by modifying the profile files located at: /data/data/com.termux/files/home/.profile /data/data/com.termux/files/home/.bashrc You can uninstall at any time with <b class=BOLD>rustup self uninstall</b> and these changes will be reverted. Current installation options: default host triple: <b class=BOLD>aarch64-linux-android</b> default toolchain: <b class=BOLD>stable (default)</b> profile: <b class=BOLD>default</b> modify PATH variable: <b class=BOLD>yes</b> 1) Proceed with installation (default) 2) Customize installation 3) Cancel installation > <b class=BOLD>info:</b> profile set to 'default' <b class=BOLD>info:</b> default host triple is aarch64-linux-android <b class=BOLD>info:</b> syncing channel updates for 'stable-aarch64-linux-android' <b class=BOLD>info:</b> latest update on 2022-08-11, rust version 1.63.0 (4b91a6ea7 2022-08-08) <b class=RED>error:</b> target 'aarch64-linux-android' not found in channel. Perhaps check https://doc.rust-lang.org/nightly/rustc/platform-support.html for available targets $ </pre></html></WRAP> </WRAP> ==== マイコン (microcomputer) ==== [[rust:rust_on_esp_install|ESP32 Rust 開発環境のインストール]]\\ [[rust:rust_on_rp_install|Raspberry Pi Pico 開発環境のインストール]]\\ ===== はるおわ〜るどする😆 ===== 参考: [[https://doc.rust-jp.rs/book-ja/ch01-02-hello-world.html|Hello, World! - The Rust Programming Language 日本語版]]\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>mkdir</b> <b class=HIK>-p</b> rs_projects/hello_world </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cd</b> rs_projects/hello_world </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cat</b> << EOF > main.rs <b class=GRN>fn</b> <b class=HIB>main</b>() { <b class=HIC>// ようこそ、はるおわ〜るどへ!</b> <b class=GRN>println!</b>(<b class=HIR>"Welcome to Haruo World!🤤"</b>); } EOF </pre></html></WRAP> <WRAP color_result><html><pre> </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustc</b> main.rs <b class=GRN>$</b> <b class=HIY>./main</b> </pre></html></WRAP> <WRAP color_result><html><pre> Welcome to Haruo World!🤤 </pre></html></WRAP> </WRAP> ==== Cargo ではるおわ〜るどする😆 ==== 参考: [[https://doc.rust-jp.rs/book-ja/ch01-03-hello-cargo.html|Hello, Cargo! - The Rust Programming Language 日本語版]]\\ \\ Cargo のバージョンが表示されれば利用出来る状態になっていることが確認できる🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cargo</b> --version </pre></html></WRAP> <WRAP color_result><html><pre> cargo 1.71.1 (7f1d04c00 2023-07-29) </pre></html></WRAP> </WRAP> Cargo でアプリ **haruo_cargo** パッケージを作成する🤔 (雛形が生成される)\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cargo</b> new haruo_cargo </pre></html></WRAP> <WRAP color_result><html><pre> <b class="BOLD GRN">Created</b> binary (application) `haruo_cargo` package </pre></html></WRAP> </WRAP> <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cd</b> haruo_cargo/ <b class=GRN>$</b> <b class=HIY>ll</b> </pre></html></WRAP> <WRAP color_result><html><pre> 合計 4 -rw-r--r-- 1 tomoyan tomoyan 180 12月 6 09:00 Cargo.toml drwxr-xr-x 1 tomoyan tomoyan 14 12月 6 09:00 src </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cat</b> Cargo.toml </pre></html></WRAP> <WRAP color_result><html><pre> [package] name = "haruo_cargo" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cat</b> src/main.rs </pre></html></WRAP> <WRAP color_result><html><pre> fn main() { println!("Hello, world!"); } </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>sed</b> <b class=HIK>-i -e</b> 's/Hello/Haruo/g' src/main.rs </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>cargo</b> run </pre></html></WRAP> <WRAP color_result><html><pre> <b class="BOLD GRN">Compiling</b> haruo_cargo v0.1.0 (/home/dietpi/my_projects/haruo_cargo) <b class="BOLD GRN">Finished</b> dev [unoptimized + debuginfo] target(s) in 7.36s <b class="BOLD GRN">Running</b> `target/debug/haruo_cargo` Haruo, world! </pre></html></WRAP> </WRAP> ===== Rust の更新 ===== 公式: [[https://doc.rust-lang.org/book/appendix-07-nightly-rust.html|G - How Rust is Made and “Nightly Rust” - The Rust Programming Language]] (英語)\\ [[https://doc.rust-jp.rs/book-ja/appendix-07-nightly-rust.html|付録G:Rustの作られ方と“Nightly Rust” - The Rust Programming Language 日本語版]] より\\ 6週間サイクルで新しいバージョンの Rust が準備されるので、リリース情報を確認して適時更新する😉\\ \\ 公式: [[https://forge.rust-lang.org/#current-release-versions|Current Release Versions - Rust Forge]] でリリースを確認できる🤔\\ \\ **rustup** の更新を行う🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <font color="#FF8700"><b>$</b></font> <font color="#26A269">rustup</font> self update <WRAP color_result><html><pre> <b>info: </b>checking for self-update <b>info: </b>downloading self-update <font color="#26A269"><b>rustup updated</b></font> - 1.27.0 (from 1.26.0) </pre></html></WRAP> <WRAP color_command><html><pre> <font color="#FF8700"><b>$</b></font> <font color="#26A269">rustup</font> <font color="#A347BA">-V</font> </pre></html></WRAP> <WRAP color_result><html><pre> rustup 1.27.0 (bbb9276d2 2024-03-08) <b>info: </b>This is the version for the rustup toolchain manager, not the rustc compiler. <b>info: </b>The currently active `rustc` version is `rustc 1.74.1 (a28077b28 2023-12-04) </pre></html></WRAP> </WRAP> **rust** の更新を行う🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <font color="#FF8700"><b>$</b></font> <font color="#26A269">rustup</font> update </pre></html></WRAP> <WRAP color_result_long><html><pre> <b>info: </b>syncing channel updates for 'stable-x86_64-unknown-linux-gnu' <b>info: </b>latest update on 2024-03-21, rust version 1.77.0 (aedd173a2 2024-03-17) <b>info: </b>downloading component 'rust-std' for 'thumbv6m-none-eabi' 9.1 MiB / 9.1 MiB (100 %) 3.2 MiB/s in 2s ETA: 0s <b>info: </b>downloading component 'rust-std' for 'arm-unknown-linux-gnueabihf' 21.0 MiB / 21.0 MiB (100 %) 2.3 MiB/s in 8s ETA: 0s <b>info: </b>downloading component 'rust-src' 2.5 MiB / 2.5 MiB (100 %) 2.2 MiB/s in 1s ETA: 0s <b>info: </b>downloading component 'cargo' 8.0 MiB / 8.0 MiB (100 %) 1.3 MiB/s in 6s ETA: 0s <b>info: </b>downloading component 'clippy' <b>info: </b>downloading component 'rust-docs' 14.9 MiB / 14.9 MiB (100 %) 1.7 MiB/s in 10s ETA: 0s <b>info: </b>downloading component 'rust-std' 26.6 MiB / 26.6 MiB (100 %) 2.2 MiB/s in 17s ETA: 0s <b>info: </b>downloading component 'rustc' 60.3 MiB / 60.3 MiB (100 %) 3.1 MiB/s in 26s ETA: 0s <b>info: </b>downloading component 'rustfmt' <b>info: </b>removing previous version of component 'rust-std' for 'thumbv6m-none-eabi' <b>info: </b>removing previous version of component 'rust-std' for 'arm-unknown-linux-gnueabihf' <b>info: </b>removing previous version of component 'rust-src' <b>info: </b>removing previous version of component 'cargo' <b>info: </b>removing previous version of component 'clippy' <b>info: </b>removing previous version of component 'rust-docs' <b>info: </b>removing previous version of component 'rust-std' <b>info: </b>removing previous version of component 'rustc' <b>info: </b>removing previous version of component 'rustfmt' <b>info: </b>installing component 'rust-std' for 'thumbv6m-none-eabi' 9.1 MiB / 9.1 MiB (100 %) 8.3 MiB/s in 2s ETA: 0s <b>info: </b>installing component 'rust-std' for 'arm-unknown-linux-gnueabihf' 21.0 MiB / 21.0 MiB (100 %) 8.1 MiB/s in 2s ETA: 0s <b>info: </b>installing component 'rust-src' <b>info: </b>installing component 'cargo' <b>info: </b>installing component 'clippy' <b>info: </b>installing component 'rust-docs' 14.9 MiB / 14.9 MiB (100 %) 3.7 MiB/s in 4s ETA: 0s <b>info: </b>installing component 'rust-std' 26.6 MiB / 26.6 MiB (100 %) 6.5 MiB/s in 4s ETA: 0s <b>info: </b>installing component 'rustc' 60.3 MiB / 60.3 MiB (100 %) 5.6 MiB/s in 10s ETA: 0s <b>info: </b>installing component 'rustfmt' <b>info: </b>syncing channel updates for 'nightly-x86_64-unknown-linux-gnu' 756.5 KiB / 756.5 KiB (100 %) 327.7 KiB/s in 3s ETA: 0s <b>info: </b>latest update on 2024-03-25, rust version 1.79.0-nightly (0824b300e 2024-03-24) <b>info: </b>downloading component 'rust-src' 2.5 MiB / 2.5 MiB (100 %) 515.1 KiB/s in 6s ETA: 0s <b>info: </b>downloading component 'rust-std' for 'riscv32imac-unknown-none-elf' 9.2 MiB / 9.2 MiB (100 %) 2.2 MiB/s in 4s ETA: 0s <b>info: </b>downloading component 'rust-std' for 'riscv32imc-unknown-none-elf' 9.0 MiB / 9.0 MiB (100 %) 3.9 MiB/s in 9s ETA: 0s <b>info: </b>downloading component 'llvm-tools' 31.3 MiB / 31.3 MiB (100 %) 690.1 KiB/s in 2m 43s ETA: 0s <b>info: </b>downloading component 'cargo' 8.1 MiB / 8.1 MiB (100 %) 3.6 MiB/s in 2s ETA: 0s <b>info: </b>downloading component 'rust-std' 26.3 MiB / 26.3 MiB (100 %) 4.4 MiB/s in 6s ETA: 0s <b>info: </b>downloading component 'rustc' 64.8 MiB / 64.8 MiB (100 %) 4.2 MiB/s in 20s ETA: 0s <b>info: </b>removing previous version of component 'rust-src' <b>info: </b>removing previous version of component 'rust-std' for 'riscv32imac-unknown-none-elf' <b>info: </b>removing previous version of component 'rust-std' for 'riscv32imc-unknown-none-elf' <b>info: </b>removing previous version of component 'llvm-tools' <b>info: </b>removing previous version of component 'cargo' <b>info: </b>removing previous version of component 'rust-std' <b>info: </b>removing previous version of component 'rustc' <b>info: </b>installing component 'rust-src' <b>info: </b>installing component 'rust-std' for 'riscv32imac-unknown-none-elf' 9.2 MiB / 9.2 MiB (100 %) 8.5 MiB/s in 1s ETA: 0s <b>info: </b>installing component 'rust-std' for 'riscv32imc-unknown-none-elf' 9.0 MiB / 9.0 MiB (100 %) 8.5 MiB/s in 1s ETA: 0s <b>info: </b>installing component 'llvm-tools' 31.3 MiB / 31.3 MiB (100 %) 9.2 MiB/s in 3s ETA: 0s <b>info: </b>installing component 'cargo' <b>info: </b>installing component 'rust-std' 26.3 MiB / 26.3 MiB (100 %) 8.5 MiB/s in 3s ETA: 0s <b>info: </b>installing component 'rustc' 64.8 MiB / 64.8 MiB (100 %) 7.3 MiB/s in 8s ETA: 0s <b>info: </b>checking for self-update <font color="#26A269"><b>stable-x86_64-unknown-linux-gnu updated</b></font> - rustc 1.77.0 (aedd173a2 2024-03-17) (from rustc 1.74.1 (a28077b28 2023-12-04)) <font color="#26A269"><b>nightly-x86_64-unknown-linux-gnu updated</b></font> - rustc 1.79.0-nightly (0824b300e 2024-03-24) (from (timeout reading rustc version)) <b>info: </b>cleaning up downloads & tmp directories </pre></html></WRAP> </WRAP> ===== ツールチェイン (toolchain) ===== 公式: [[https://rust-lang.github.io/rustup/concepts/toolchains.html|Toolchains - The rustup book]] [[gtr>https://rust-lang.github.io/rustup/concepts/toolchains.html|翻訳]]\\ Rust のツールチェーン仕様は <html><pre><code><channel>[-<date>][-<host>] <channel> = stable|beta|nightly|<major.minor>|<major.minor.patch> <date> = YYYY-MM-DD <host> = <target-triple> </code></pre></html> 例: stable-x86_64-unknown-linux-gnu\\ **channel:** //stable//\\ **date:** \\ **host:** //x86_64-unknown-linux-gnu (target-triple)//\\ esp32 マイコン用の <html><code>esp</code></html> ツールチェーンは [[rust:rust_on_esp_install#ツールチェーンのインストール|espup]] で追加する。\\ インストール済みのツールチェーン一覧の確認🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp </pre></html></WRAP> </WRAP> デフォルトのツールチェインを確認する🤔\\ **Fedora**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> show </pre></html></WRAP> <WRAP color_result><html><pre> <b class=BOLD>Default host:</b> x86_64-unknown-linux-gnu <b class=BOLD>rustup home:</b> /home/tomoyan/.rustup stable-x86_64-unknown-linux-gnu (default) rustc 1.72.0 (5680fa18f 2023-08-23) </pre></html></WRAP> </WRAP> **DietPi**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> show </pre></html></WRAP> <WRAP color_result><html><pre> <b class=BOLD>Default host:</b> arm-unknown-linux-gnueabihf <b class=BOLD>rustup home:</b> /home/dietpi/.rustup stable-arm-unknown-linux-gnueabihf (default) rustc 1.72.0 (5680fa18f 2023-08-23) </pre></html></WRAP> </WRAP> ==== バージョンを指定したツールチェーンの追加 ==== 公式: [[https://rust-lang.github.io/rustup/concepts/channels.html|Channels - The rustup book]] [[gtr>https://rust-lang.github.io/rustup/concepts/channels.html|翻訳]]\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain install 1.67 </pre></html></WRAP> <WRAP color_result><html><pre> <b>info: </b>syncing channel updates for '1.67-x86_64-unknown-linux-gnu' <b>info: </b>latest update on 2023-02-09, rust version 1.67.1 (d5a82bbd2 2023-02-07) <b>info: </b>downloading component 'cargo' 6.6 MiB / 6.6 MiB (100 %) 2.7 MiB/s in 2s ETA: 0s <b>info: </b>downloading component 'clippy' <b>info: </b>downloading component 'rust-docs' 19.3 MiB / 19.3 MiB (100 %) 3.8 MiB/s in 5s ETA: 0s <b>info: </b>downloading component 'rust-std' 29.3 MiB / 29.3 MiB (100 %) 522.0 KiB/s in 15s ETA: 0s <b>info: </b>downloading component 'rustc' 67.8 MiB / 67.8 MiB (100 %) 4.5 MiB/s in 18s ETA: 0s <b>info: </b>downloading component 'rustfmt' 4.5 MiB / 4.5 MiB (100 %) 4.1 MiB/s in 1s ETA: 0s <b>info: </b>installing component 'cargo' <b>info: </b>installing component 'clippy' <b>info: </b>installing component 'rust-docs' 19.3 MiB / 19.3 MiB (100 %) 5.0 MiB/s in 3s ETA: 0s <b>info: </b>installing component 'rust-std' 29.3 MiB / 29.3 MiB (100 %) 6.9 MiB/s in 4s ETA: 0s <b>info: </b>installing component 'rustc' 67.8 MiB / 67.8 MiB (100 %) 6.3 MiB/s in 16s ETA: 0s 4 IO-ops / 4 IO-ops (100 %) 0 IOPS in 8s ETA: Unknown <b>info: </b>installing component 'rustfmt' <span style="color:#26A269"><b>1.67-x86_64-unknown-linux-gnu installed</b></span> - rustc 1.67.1 (d5a82bbd2 2023-02-07) <b>info: </b>checking for self-update </pre></html></WRAP> </WRAP> 追加されたツールチェーンのコンパイラバージョンを確認する🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> run 1.67 rustc <span style="color:#A347BA">-V</span> </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.67.1 (d5a82bbd2 2023-02-07) </pre></html></WRAP> </WRAP> 追加されたツールチェーンをデフォルトに設定する🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> default 1.67 </pre></html></WRAP> <WRAP color_result><html><pre> <b>info: </b>using existing install for '1.67-x86_64-unknown-linux-gnu' <b>info: </b>default toolchain set to '1.67-x86_64-unknown-linux-gnu' <b>1.67-x86_64-unknown-linux-gnu unchanged</b> - rustc 1.67.1 (d5a82bbd2 2023-02-07) </pre></html></WRAP> </WRAP> ツールチェーン一覧でもデフォルトを確認できる🤔\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu nightly-x86_64-unknown-linux-gnu 1.67-x86_64-unknown-linux-gnu <b class=DiYE>(default)</b> esp </pre></html></WRAP> </WRAP> デフォルトツールチェーンのコンパイラバージョンを確認する🤔\\ <WRAP color_term> <WRAP color_command><html><pre><span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustc</span><span style="color:#999999"> </span><span style="color:#A347BA">-V</span><span style="color:#999999"> </span><span style="color:#A347BA">--verbose</span> </pre></html></WRAP> <WRAP color_result><html><pre> rustc 1.76.0-nightly (87e1447aa 2023-11-30) binary: rustc commit-hash: 87e1447aadaa2899ff6ccabe1fa669eb50fb60a1 commit-date: 2023-11-30 host: x86_64-unknown-linux-gnu release: 1.76.0-nightly LLVM version: 17.0.5 </pre></html></WRAP> </WRAP> ==== ツールチェーンの削除 ==== <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain uninstall 1.67 </pre></html></WRAP> <WRAP color_result><html><pre> <b>info: </b>uninstalling toolchain '1.67-x86_64-unknown-linux-gnu' <b>info: </b>toolchain '1.67-x86_64-unknown-linux-gnu' uninstalled </pre></html></WRAP> </WRAP> <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp </pre></html></WRAP> </WRAP> ==== ディレクトリ毎のツールチェーンのオーバーライド ==== 公式: [[https://rust-lang.github.io/rustup/overrides.html#directory-overrides|Directory overrides - Overrides - The rustup book]] [[gtr>https://rust-lang.github.io/rustup/overrides.html#directory-overrides|翻訳]]\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp </pre></html></WRAP> </WRAP> <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">cd</span> <u style="text-decoration-style:single">e</u><span style="color:#999999"><u style="text-decoration-style:single">sp32-nostd-ssd1306</u></span> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> override set esp </pre></html></WRAP> <WRAP color_result><html><pre> <b>info: </b>override toolchain for '/home/tomoyan/my_projects/esp32-nostd-ssd1306' set to 'esp' </pre></html></WRAP> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp (override) </pre></html></WRAP> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">cd</span> <u style="text-decoration-style:single">..</u> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp </pre></html></WRAP> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">cd</span> <u style="text-decoration-style:single">e</u><span style="color:#999999"><u style="text-decoration-style:single">sp32-nostd-ssd1306</u></span> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span> toolchain list </pre></html></WRAP> <WRAP color_result><html><pre> stable-x86_64-unknown-linux-gnu (default) nightly-x86_64-unknown-linux-gnu esp (override) </pre></html></WRAP> </WRAP> オーバーライドの解除\\ <WRAP color_term> <WRAP color_command><html><pre> <span style="color:#FF8700"><b>$</b></span> <span style="color:#26A269">rustup</span><span style="color:#999999"> override unset</span> </pre></html></WRAP> <WRAP color_result><html><pre> <b>info: </b>override toolchain for '/home/tomoyan/my_projects/esp32-nostd-ssd1306' removed </pre></html></WRAP> </WRAP> ==== クロスビルド可能なターゲットの一覧表示 ==== ※ターゲットトリプル: <html><code>{arch}-{vendor}-{sys}-{abi}</code></html>\\ <html><code>{abi}</code></html> を除く <html><code>{arch}-{vendor}-{sys}</code></html> のこと🤔\\ **Fedora**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target list | <b class=HIY>grep</b> installed </pre></html></WRAP> <WRAP color_result><html><pre> x86_64-unknown-linux-gnu (<b class=RED>installed</b>) </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target list </pre></html></WRAP> <WRAP color_result_long><html><pre> aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-fuchsia aarch64-linux-android aarch64-pc-windows-msvc aarch64-unknown-linux-gnu aarch64-unknown-linux-musl aarch64-unknown-none aarch64-unknown-none-softfloat arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf arm-unknown-linux-musleabi arm-unknown-linux-musleabihf armebv7r-none-eabi armebv7r-none-eabihf armv5te-unknown-linux-gnueabi armv5te-unknown-linux-musleabi armv7-linux-androideabi armv7-unknown-linux-gnueabi armv7-unknown-linux-gnueabihf armv7-unknown-linux-musleabi armv7-unknown-linux-musleabihf armv7a-none-eabi armv7r-none-eabi armv7r-none-eabihf asmjs-unknown-emscripten i586-pc-windows-msvc i586-unknown-linux-gnu i586-unknown-linux-musl i686-linux-android i686-pc-windows-gnu i686-pc-windows-msvc i686-unknown-freebsd i686-unknown-linux-gnu i686-unknown-linux-musl mips-unknown-linux-gnu mips-unknown-linux-musl mips64-unknown-linux-gnuabi64 mips64-unknown-linux-muslabi64 mips64el-unknown-linux-gnuabi64 mips64el-unknown-linux-muslabi64 mipsel-unknown-linux-gnu mipsel-unknown-linux-musl nvptx64-nvidia-cuda powerpc-unknown-linux-gnu powerpc64-unknown-linux-gnu powerpc64le-unknown-linux-gnu riscv32i-unknown-none-elf riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf riscv64gc-unknown-linux-gnu riscv64gc-unknown-none-elf riscv64imac-unknown-none-elf s390x-unknown-linux-gnu sparc64-unknown-linux-gnu sparcv9-sun-solaris thumbv6m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi thumbv7neon-linux-androideabi thumbv7neon-unknown-linux-gnueabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf wasm32-unknown-emscripten wasm32-unknown-unknown wasm32-wasi x86_64-apple-darwin x86_64-apple-ios x86_64-fortanix-unknown-sgx x86_64-fuchsia x86_64-linux-android x86_64-pc-solaris x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-sun-solaris x86_64-unknown-freebsd x86_64-unknown-illumos <b class=BOLD>x86_64-unknown-linux-gnu (installed)</b> x86_64-unknown-linux-gnux32 x86_64-unknown-linux-musl x86_64-unknown-netbsd x86_64-unknown-none x86_64-unknown-redox </pre></html></WRAP> </WRAP> **DietPi**\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target list | <b class=HIY>grep</b> installed </pre></html></WRAP> <WRAP color_result><html><pre> arm-unknown-linux-gnueabihf (<b class=RED>installed</b>) </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target list </pre></html></WRAP> <WRAP color_result_long><html><pre> aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim aarch64-fuchsia aarch64-linux-android aarch64-pc-windows-msvc aarch64-unknown-linux-gnu aarch64-unknown-linux-musl aarch64-unknown-none aarch64-unknown-none-softfloat arm-linux-androideabi arm-unknown-linux-gnueabi <b class=BOLD>arm-unknown-linux-gnueabihf (installed)</b> arm-unknown-linux-musleabi arm-unknown-linux-musleabihf armebv7r-none-eabi armebv7r-none-eabihf armv5te-unknown-linux-gnueabi armv5te-unknown-linux-musleabi armv7-linux-androideabi armv7-unknown-linux-gnueabi armv7-unknown-linux-gnueabihf armv7-unknown-linux-musleabi armv7-unknown-linux-musleabihf armv7a-none-eabi armv7r-none-eabi armv7r-none-eabihf asmjs-unknown-emscripten i586-pc-windows-msvc i586-unknown-linux-gnu i586-unknown-linux-musl i686-linux-android i686-pc-windows-gnu i686-pc-windows-msvc i686-unknown-freebsd i686-unknown-linux-gnu i686-unknown-linux-musl mips-unknown-linux-gnu mips-unknown-linux-musl mips64-unknown-linux-gnuabi64 mips64-unknown-linux-muslabi64 mips64el-unknown-linux-gnuabi64 mips64el-unknown-linux-muslabi64 mipsel-unknown-linux-gnu mipsel-unknown-linux-musl nvptx64-nvidia-cuda powerpc-unknown-linux-gnu powerpc64-unknown-linux-gnu powerpc64le-unknown-linux-gnu riscv32i-unknown-none-elf riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf riscv64gc-unknown-linux-gnu riscv64gc-unknown-none-elf riscv64imac-unknown-none-elf s390x-unknown-linux-gnu sparc64-unknown-linux-gnu sparcv9-sun-solaris thumbv6m-none-eabi thumbv7em-none-eabi thumbv7em-none-eabihf thumbv7m-none-eabi thumbv7neon-linux-androideabi thumbv7neon-unknown-linux-gnueabihf thumbv8m.base-none-eabi thumbv8m.main-none-eabi thumbv8m.main-none-eabihf wasm32-unknown-emscripten wasm32-unknown-unknown wasm32-wasi x86_64-apple-darwin x86_64-apple-ios x86_64-fortanix-unknown-sgx x86_64-fuchsia x86_64-linux-android x86_64-pc-solaris x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-sun-solaris x86_64-unknown-freebsd x86_64-unknown-illumos x86_64-unknown-linux-gnu x86_64-unknown-linux-gnux32 x86_64-unknown-linux-musl x86_64-unknown-netbsd x86_64-unknown-redox </pre></html></WRAP> </WRAP> ==== インストール ==== 公式: [[https://rust-lang.github.io/rustup/cross-compilation.html|Cross-compilation - The rustup book]]\\ クロスビルド可能なターゲットの一覧に存在するものは、ターゲットを追加するだけで済みます😊\\ <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target add arm-unknown-linux-gnueabihf </pre></html></WRAP> <WRAP color_result><html><pre> <b class=BOLD>info:</b> downloading component 'rust-std' for 'arm-unknown-linux-gnueabihf' <b class=BOLD>info:</b> installing component 'rust-std' for 'arm-unknown-linux-gnueabihf' 22.5 MiB / 22.5 MiB (100 %) 8.1 MiB/s in 2s ETA: 0s </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> show <b class=BOLD>Default host:</b> x86_64-unknown-linux-gnu <b class=BOLD>rustup home:</b> /home/tomoyan/.rustup <b class=BOLD>installed targets for active toolchain --------------------------------------</b> arm-unknown-linux-gnueabihf x86_64-unknown-linux-gnu <b class=BOLD>active toolchain ----------------</b> stable-x86_64-unknown-linux-gnu (default) rustc 1.72.0 (5680fa18f 2023-08-23) </pre></html></WRAP> </WRAP> ==== アンインストール ==== <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> target remove thumbv7em-none-eabihf </pre></html></WRAP> <WRAP color_result><html><pre> <b class=BOLD>info:</b> removing component 'rust-std' for 'thumbv7em-none-eabihf' </pre></html></WRAP> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> show <b class=BOLD>Default host:</b> x86_64-unknown-linux-gnu <b class=BOLD>rustup home:</b> /home/tomoyan/.rustup stable-x86_64-unknown-linux-gnu (default) rustc 1.65.0 (897e37553 2022-11-02) </pre></html></WRAP> </WRAP> ===== Rust のアンインストール ===== <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> self uninstall </pre></html></WRAP> <WRAP color_result><html><pre> Thanks for hacking in Rust! This will uninstall all Rust toolchains and data, and remove $HOME/.cargo/bin from your PATH environment variable. Continue? (y/N) y <b class=DiYE>-> y を入力して Enter</b> info: removing rustup home info: removing cargo home info: removing rustup binaries info: rustup is uninstalled </pre></html></WRAP> </WRAP> ===== レシピ ===== ==== sccache - Shared Compilation Cache ==== ソースコード: [[git>mozilla/sccache|mozilla/sccache: sccache is ccache with cloud storage]]\\ <WRAP color_term> <WRAP color_command><code> $ TMPDIR=/var/tmp cargo install sccache </code></WRAP> <WRAP color_result_hlong><html><pre> <b class=GRN>Updating</b> crates.io index <b class=GRN>Downloaded</b> sccache v0.3.0 <b class=GRN>Downloaded</b> 1 crate (272.5 KB) in 0.70s <b class=GRN>Installing</b> sccache v0.3.0 <b class=GRN>Downloaded</b> async-trait v0.1.56 <b class=GRN>Downloaded</b> crypto-common v0.1.3 <b class=GRN>Downloaded</b> ar v0.9.0 <b class=GRN>Downloaded</b> digest v0.10.3 <b class=GRN>Downloaded</b> bincode v1.3.3 <b class=GRN>Downloaded</b> base64 v0.13.0 <b class=GRN>Downloaded</b> directories v4.0.1 <b class=GRN>Downloaded</b> zstd-safe v3.0.1+zstd.1.4.9 <b class=GRN>Downloaded</b> try-lock v0.2.3 <b class=GRN>Downloaded</b> hyper v0.14.19 <b class=GRN>Downloaded</b> unix_socket v0.5.0 <b class=GRN>Downloaded</b> xattr v0.2.3 <b class=GRN>Downloaded</b> daemonize v0.4.1 <b class=GRN>Downloaded</b> boxfnonce v0.1.1 <b class=GRN>Downloaded</b> md5 v0.3.8 <b class=GRN>Downloaded</b> language-tags v0.3.2 <b class=GRN>Downloaded</b> thiserror-impl v1.0.31 <b class=GRN>Downloaded</b> hyperx v1.4.0 <b class=GRN>Downloaded</b> openssl-sys v0.9.74 <b class=GRN>Downloaded</b> pulldown-cmark v0.0.3 <b class=GRN>Downloaded</b> mio v0.8.3 <b class=GRN>Downloaded</b> pin-project v1.0.10 <b class=GRN>Downloaded</b> openssl-macros v0.1.0 <b class=GRN>Downloaded</b> native-tls v0.2.10 <b class=GRN>Downloaded</b> bufstream v0.1.4 <b class=GRN>Downloaded</b> mime v0.3.16 <b class=GRN>Downloaded</b> openssl v0.10.40 <b class=GRN>Downloaded</b> getopts v0.2.21 <b class=GRN>Downloaded</b> blake3 v0.3.8 <b class=GRN>Downloaded</b> retry v1.3.1 <b class=GRN>Downloaded</b> redis v0.21.5 <b class=GRN>Downloaded</b> spin v0.5.2 <b class=GRN>Downloaded</b> tokio-native-tls v0.3.0 <b class=GRN>Downloaded</b> vte_generate_state_changes v0.1.1 <b class=GRN>Downloaded</b> tokio-serde v0.8.0 <b class=GRN>Downloaded</b> skeptic v0.4.0 <b class=GRN>Downloaded</b> constant_time_eq v0.1.5 <b class=GRN>Downloaded</b> futures-locks v0.7.0 <b class=GRN>Downloaded</b> dtoa v0.4.8 <b class=GRN>Downloaded</b> hmac v0.12.1 <b class=GRN>Downloaded</b> conhash v0.4.0 <b class=GRN>Downloaded</b> tokio-util v0.6.10 <b class=GRN>Downloaded</b> tower v0.4.12 <b class=GRN>Downloaded</b> untrusted v0.7.1 <b class=GRN>Downloaded</b> tower-layer v0.3.1 <b class=GRN>Downloaded</b> toml v0.5.9 <b class=GRN>Downloaded</b> tokio-util v0.7.3 <b class=GRN>Downloaded</b> memcached-rs v0.4.2 <b class=GRN>Downloaded</b> ipnet v2.5.0 <b class=GRN>Downloaded</b> httparse v1.7.1 <b class=GRN>Downloaded</b> http v0.2.8 <b class=GRN>Downloaded</b> aho-corasick v0.7.18 <b class=GRN>Downloaded</b> zstd-sys v1.4.20+zstd.1.4.9 <b class=GRN>Downloaded</b> tar v0.4.38 <b class=GRN>Downloaded</b> futures-macro v0.3.21 <b class=GRN>Downloaded</b> futures-sink v0.3.21 <b class=GRN>Downloaded</b> pin-utils v0.1.0 <b class=GRN>Downloaded</b> itoa v0.4.8 <b class=GRN>Downloaded</b> humantime v2.1.0 <b class=GRN>Downloaded</b> semver-parser v0.7.0 <b class=GRN>Downloaded</b> rand_chacha v0.2.2 <b class=GRN>Downloaded</b> rand_chacha v0.3.1 <b class=GRN>Downloaded</b> signal-hook-registry v1.4.0 <b class=GRN>Downloaded</b> rand_core v0.6.3 <b class=GRN>Downloaded</b> futures-task v0.3.21 <b class=GRN>Downloaded</b> foreign-types-shared v0.1.1 <b class=GRN>Downloaded</b> want v0.3.0 <b class=GRN>Downloaded</b> hyper-tls v0.5.0 <b class=GRN>Downloaded</b> slab v0.4.6 <b class=GRN>Downloaded</b> strip-ansi-escapes v0.1.1 <b class=GRN>Downloaded</b> sha-1 v0.10.0 <b class=GRN>Downloaded</b> semver v0.9.0 <b class=GRN>Downloaded</b> openssl-probe v0.1.5 <b class=GRN>Downloaded</b> tokio-macros v1.8.0 <b class=GRN>Downloaded</b> socket2 v0.4.4 <b class=GRN>Downloaded</b> flate2 v1.0.24 <b class=GRN>Downloaded</b> futures-channel v0.3.21 <b class=GRN>Downloaded</b> rand v0.8.5 <b class=GRN>Downloaded</b> futures-util v0.3.21 <b class=GRN>Downloaded</b> rand v0.7.3 <b class=GRN>Downloaded</b> zip v0.5.13 <b class=GRN>Downloaded</b> serde_urlencoded v0.7.1 <b class=GRN>Downloaded</b> pin-project-internal v1.0.10 <b class=GRN>Downloaded</b> rand v0.4.6 <b class=GRN>Downloaded</b> bytes v1.1.0 <b class=GRN>Downloaded</b> tower-service v0.3.1 <b class=GRN>Downloaded</b> thiserror v1.0.31 <b class=GRN>Downloaded</b> reqwest v0.11.11 <b class=GRN>Downloaded</b> termcolor v1.1.3 <b class=GRN>Downloaded</b> httpdate v1.0.2 <b class=GRN>Downloaded</b> crc32fast v1.3.2 <b class=GRN>Downloaded</b> block-buffer v0.10.2 <b class=GRN>Downloaded</b> linked-hash-map v0.5.4 <b class=GRN>Downloaded</b> sha2 v0.10.2 <b class=GRN>Downloaded</b> jobserver v0.1.24 <b class=GRN>Downloaded</b> arrayvec v0.5.2 <b class=GRN>Downloaded</b> foreign-types v0.3.2 <b class=GRN>Downloaded</b> byteorder v1.4.3 <b class=GRN>Downloaded</b> futures-io v0.3.21 <b class=GRN>Downloaded</b> futures v0.3.21 <b class=GRN>Downloaded</b> rand_core v0.5.1 <b class=GRN>Downloaded</b> cfg-if v0.1.10 <b class=GRN>Downloaded</b> ppv-lite86 v0.2.16 <b class=GRN>Downloaded</b> getrandom v0.1.16 <b class=GRN>Downloaded</b> http-body v0.4.5 <b class=GRN>Downloaded</b> futures-core v0.3.21 <b class=GRN>Downloaded</b> futures-executor v0.3.21 <b class=GRN>Downloaded</b> fnv v1.0.7 <b class=GRN>Downloaded</b> env_logger v0.9.0 <b class=GRN>Downloaded</b> md-5 v0.10.1 <b class=GRN>Downloaded</b> counted-array v0.1.2 <b class=GRN>Downloaded</b> combine v4.6.4 <b class=GRN>Downloaded</b> zstd v0.6.1+zstd.1.4.9 <b class=GRN>Downloaded</b> vte v0.10.1 <b class=GRN>Downloaded</b> local-encoding v0.2.0 <b class=GRN>Downloaded</b> crypto-mac v0.8.0 <b class=GRN>Downloaded</b> number_prefix v0.4.0 <b class=GRN>Downloaded</b> h2 v0.3.13 <b class=GRN>Downloaded</b> arrayref v0.3.6 <b class=GRN>Downloaded</b> tempdir v0.3.7 <b class=GRN>Downloaded</b> tokio v1.19.2 <b class=GRN>Downloaded</b> encoding_rs v0.8.31 <b class=GRN>Downloaded</b> ring v0.16.20 <b class=GRN>Downloaded</b> 123 crates (13.1 MB) in 3.04s (largest was `ring` at 5.1 MB) <b class=GRN>Downloaded</b> parity-tokio-ipc v0.9.0 <b class=GRN>Downloaded</b> 1 crate (15.9 KB) in 0.36s <b class=GRN>Downloaded</b> winapi v0.3.9 <b class=GRN>Downloaded</b> 1 crate (1.2 MB) in 0.37s <b class=GRN>Compiling</b> libc v0.2.126 <b class=GRN>Compiling</b> cfg-if v1.0.0 <b class=GRN>Compiling</b> proc-macro2 v1.0.39 <b class=GRN>Compiling</b> unicode-ident v1.0.1 <b class=GRN>Compiling</b> syn v1.0.96 <b class=GRN>Compiling</b> autocfg v1.1.0 <b class=GRN>Compiling</b> log v0.4.17 <b class=GRN>Compiling</b> memchr v2.5.0 <b class=GRN>Compiling</b> once_cell v1.12.0 <b class=GRN>Compiling</b> version_check v0.9.4 <b class=GRN>Compiling</b> pin-project-lite v0.2.9 <b class=GRN>Compiling</b> futures-core v0.3.21 <b class=GRN>Compiling</b> bytes v1.1.0 <b class=GRN>Compiling</b> futures-sink v0.3.21 <b class=GRN>Compiling</b> typenum v1.15.0 <b class=GRN>Compiling</b> futures-channel v0.3.21 <b class=GRN>Compiling</b> futures-task v0.3.21 <b class=GRN>Compiling</b> pkg-config v0.3.25 <b class=GRN>Compiling</b> futures-util v0.3.21 <b class=GRN>Compiling</b> itoa v1.0.2 <b class=GRN>Compiling</b> pin-utils v0.1.0 <b class=GRN>Compiling</b> futures-io v0.3.21 <b class=GRN>Compiling</b> slab v0.4.6 <b class=GRN>Compiling</b> openssl v0.10.40 <b class=GRN>Compiling</b> serde v1.0.137 <b class=GRN>Compiling</b> bitflags v1.3.2 <b class=GRN>Compiling</b> fnv v1.0.7 <b class=GRN>Compiling</b> foreign-types-shared v0.1.1 <b class=GRN>Compiling</b> subtle v2.4.1 <b class=GRN>Compiling</b> getrandom v0.1.16 <b class=GRN>Compiling</b> percent-encoding v2.1.0 <b class=GRN>Compiling</b> matches v0.1.9 <b class=GRN>Compiling</b> ppv-lite86 v0.2.16 <b class=GRN>Compiling</b> native-tls v0.2.10 <b class=GRN>Compiling</b> tinyvec_macros v0.1.0 <b class=GRN>Compiling</b> unicode-width v0.1.9 <b class=GRN>Compiling</b> remove_dir_all v0.5.3 <b class=GRN>Compiling</b> httparse v1.7.1 <b class=GRN>Compiling</b> openssl-probe v0.1.5 <b class=GRN>Compiling</b> hashbrown v0.11.2 <b class=GRN>Compiling</b> tower-service v0.3.1 <b class=GRN>Compiling</b> unicode-bidi v0.3.8 <b class=GRN>Compiling</b> httpdate v1.0.2 <b class=GRN>Compiling</b> try-lock v0.2.3 <b class=GRN>Compiling</b> crc32fast v1.3.2 <b class=GRN>Compiling</b> arrayvec v0.5.2 <b class=GRN>Compiling</b> encoding_rs v0.8.31 <b class=GRN>Compiling</b> zstd-safe v3.0.1+zstd.1.4.9 <b class=GRN>Compiling</b> ryu v1.0.10 <b class=GRN>Compiling</b> serde_json v1.0.81 <b class=GRN>Compiling</b> cfg-if v0.1.10 <b class=GRN>Compiling</b> async-trait v0.1.56 <b class=GRN>Compiling</b> byteorder v1.4.3 <b class=GRN>Compiling</b> utf8parse v0.2.0 <b class=GRN>Compiling</b> adler v1.0.2 <b class=GRN>Compiling</b> semver-parser v0.7.0 <b class=GRN>Compiling</b> cpufeatures v0.2.2 <b class=GRN>Compiling</b> anyhow v1.0.57 <b class=GRN>Compiling</b> mime v0.3.16 <b class=GRN>Compiling</b> regex-syntax v0.6.26 <b class=GRN>Compiling</b> hyperx v1.4.0 <b class=GRN>Compiling</b> serde_derive v1.0.137 <b class=GRN>Compiling</b> md5 v0.3.8 <b class=GRN>Compiling</b> base64 v0.13.0 <b class=GRN>Compiling</b> ipnet v2.5.0 <b class=GRN>Compiling</b> termcolor v1.1.3 <b class=GRN>Compiling</b> same-file v1.0.6 <b class=GRN>Compiling</b> untrusted v0.7.1 <b class=GRN>Compiling</b> boxfnonce v0.1.1 <b class=GRN>Compiling</b> lazy_static v1.4.0 <b class=GRN>Compiling</b> constant_time_eq v0.1.5 <b class=GRN>Compiling</b> tower-layer v0.3.1 <b class=GRN>Compiling</b> fastrand v1.7.0 <b class=GRN>Compiling</b> itoa v0.4.8 <b class=GRN>Compiling</b> bufstream v0.1.4 <b class=GRN>Compiling</b> strsim v0.8.0 <b class=GRN>Compiling</b> ansi_term v0.12.1 <b class=GRN>Compiling</b> arrayref v0.3.6 <b class=GRN>Compiling</b> either v1.6.1 <b class=GRN>Compiling</b> dtoa v0.4.8 <b class=GRN>Compiling</b> humantime v2.1.0 <b class=GRN>Compiling</b> vec_map v0.8.2 <b class=GRN>Compiling</b> spin v0.5.2 <b class=GRN>Compiling</b> language-tags v0.3.2 <b class=GRN>Compiling</b> linked-hash-map v0.5.4 <b class=GRN>Compiling</b> counted-array v0.1.2 <b class=GRN>Compiling</b> number_prefix v0.4.0 <b class=GRN>Compiling</b> ar v0.9.0 <b class=GRN>Compiling</b> indexmap v1.8.2 <b class=GRN>Compiling</b> num-traits v0.2.15 <b class=GRN>Compiling</b> num-integer v0.1.45 <b class=GRN>Compiling</b> tracing-core v0.1.27 <b class=GRN>Compiling</b> generic-array v0.14.5 <b class=GRN>Compiling</b> unicase v2.6.0 <b class=GRN>Compiling</b> http v0.2.8 <b class=GRN>Compiling</b> foreign-types v0.3.2 <b class=GRN>Compiling</b> form_urlencoded v1.0.1 <b class=GRN>Compiling</b> tinyvec v1.6.0 <b class=GRN>Compiling</b> getopts v0.2.21 <b class=GRN>Compiling</b> textwrap v0.11.0 <b class=GRN>Compiling</b> miniz_oxide v0.5.3 <b class=GRN>Compiling</b> semver v0.9.0 <b class=GRN>Compiling</b> walkdir v2.3.2 <b class=GRN>Compiling</b> http-body v0.4.5 <b class=GRN>Compiling</b> unicode-normalization v0.1.19 <b class=GRN>Compiling</b> pulldown-cmark v0.0.3 <b class=GRN>Compiling</b> quote v1.0.18 <b class=GRN>Compiling</b> num_cpus v1.13.1 <b class=GRN>Compiling</b> signal-hook-registry v1.4.0 <b class=GRN>Compiling</b> socket2 v0.4.4 <b class=GRN>Compiling</b> getrandom v0.2.7 <b class=GRN>Compiling</b> atty v0.2.14 <b class=GRN>Compiling</b> time v0.1.44 <b class=GRN>Compiling</b> unix_socket v0.5.0 <b class=GRN>Compiling</b> dirs-sys v0.3.7 <b class=GRN>Compiling</b> xattr v0.2.3 <b class=GRN>Compiling</b> filetime v0.2.16 <b class=GRN>Compiling</b> tempfile v3.3.0 <b class=GRN>Compiling</b> jobserver v0.1.24 <b class=GRN>Compiling</b> daemonize v0.4.1 <b class=GRN>Compiling</b> which v4.2.5 <b class=GRN>Compiling</b> rand v0.4.6 <b class=GRN>Compiling</b> mio v0.8.3 <b class=GRN>Compiling</b> tracing v0.1.35 <b class=GRN>Compiling</b> want v0.3.0 <b class=GRN>Compiling</b> conhash v0.4.0 <b class=GRN>Compiling</b> aho-corasick v0.7.18 <b class=GRN>Compiling</b> idna v0.2.3 <b class=GRN>Compiling</b> serde_urlencoded v0.7.1 <b class=GRN>Compiling</b> bincode v1.3.3 <b class=GRN>Compiling</b> toml v0.5.9 <b class=GRN>Compiling</b> flate2 v1.0.24 <b class=GRN>Compiling</b> vte_generate_state_changes v0.1.1 <b class=GRN>Compiling</b> rand_core v0.6.3 <b class=GRN>Compiling</b> uuid v0.8.2 <b class=GRN>Compiling</b> rand_core v0.5.1 <b class=GRN>Compiling</b> clap v2.34.0 <b class=GRN>Compiling</b> directories v4.0.1 <b class=GRN>Compiling</b> tar v0.4.38 <b class=GRN>Compiling</b> cc v1.0.73 <b class=GRN>Compiling</b> tempdir v0.3.7 <b class=GRN>Compiling</b> tower v0.4.12 <b class=GRN>Compiling</b> regex v1.5.6 <b class=GRN>Compiling</b> crypto-common v0.1.3 <b class=GRN>Compiling</b> block-buffer v0.10.2 <b class=GRN>Compiling</b> digest v0.9.0 <b class=GRN>Compiling</b> crypto-mac v0.8.0 <b class=GRN>Compiling</b> url v2.2.2 <b class=GRN>Compiling</b> vte v0.10.1 <b class=GRN>Compiling</b> rand_chacha v0.3.1 <b class=GRN>Compiling</b> rand_chacha v0.2.2 <b class=GRN>Compiling</b> tokio-macros v1.8.0 <b class=GRN>Compiling</b> futures-macro v0.3.21 <b class=GRN>Compiling</b> openssl-macros v0.1.0 <b class=GRN>Compiling</b> thiserror-impl v1.0.31 <b class=GRN>Compiling</b> pin-project-internal v1.0.10 <b class=GRN>Compiling</b> openssl-sys v0.9.74 <b class=GRN>Compiling</b> zstd-sys v1.4.20+zstd.1.4.9 <b class=GRN>Compiling</b> blake3 v0.3.8 <b class=GRN>Compiling</b> ring v0.16.20 <b class=GRN>Compiling</b> skeptic v0.4.0 <b class=GRN>Compiling</b> chrono v0.4.19 <b class=GRN>Compiling</b> env_logger v0.9.0 <b class=GRN>Compiling</b> digest v0.10.3 <b class=GRN>Compiling</b> strip-ansi-escapes v0.1.1 <b class=GRN>Compiling</b> rand v0.8.5 <b class=GRN>Compiling</b> rand v0.7.3 <b class=GRN>Compiling</b> tokio v1.19.2 <b class=GRN>Compiling</b> thiserror v1.0.31 <b class=GRN>Compiling</b> pin-project v1.0.10 <b class=GRN>Compiling</b> local-encoding v0.2.0 <b class=GRN>Compiling</b> md-5 v0.10.1 <b class=GRN>Compiling</b> hmac v0.12.1 <b class=GRN>Compiling</b> sha-1 v0.10.0 <b class=GRN>Compiling</b> sha2 v0.10.2 <b class=GRN>Compiling</b> retry v1.3.1 <b class=GRN>Compiling</b> memcached-rs v0.4.2 <b class=GRN>Compiling</b> futures-executor v0.3.21 <b class=GRN>Compiling</b> tokio-util v0.7.3 <b class=GRN>Compiling</b> tokio-util v0.6.10 <b class=GRN>Compiling</b> futures-locks v0.7.0 <b class=GRN>Compiling</b> zip v0.5.13 <b class=GRN>Compiling</b> tokio-serde v0.8.0 <b class=GRN>Compiling</b> futures v0.3.21 <b class=GRN>Compiling</b> h2 v0.3.13 <b class=GRN>Compiling</b> combine v4.6.4 <b class=GRN>Compiling</b> hyper v0.14.19 <b class=GRN>Compiling</b> tokio-native-tls v0.3.0 <b class=GRN>Compiling</b> hyper-tls v0.5.0 <b class=GRN>Compiling</b> redis v0.21.5 <b class=GRN>Compiling</b> reqwest v0.11.11 <b class=GRN>Compiling</b> zstd v0.6.1+zstd.1.4.9 <b class=GRN>Compiling</b> sccache v0.3.0 <b class=GRN>Finished</b> release [optimized] target(s) in 5m 56s <b class=GRN>Installing</b> /home/tomoyan/.cargo/bin/sccache <b class=GRN>Installed</b> package `sccache v0.3.0` (executable `sccache`) </pre></html></WRAP> </WRAP> **動作確認**\\ <WRAP color_term> <WRAP color_command><code> $ sccache -h </code></WRAP> <WRAP color_result_hlong><html><pre> sccache 0.3.0 USAGE: sccache [FLAGS] [OPTIONS] [cmd]... FLAGS: --dist-auth authenticate for distributed compilation --dist-status show status of the distributed client -h, --help Prints help information -s, --show-stats show cache statistics --start-server start background server --stop-server stop background server -V, --version Prints version information -z, --zero-stats zero statistics counters OPTIONS: --package-toolchain <executable> <out> package toolchain for distributed compilation --stats-format <stats-format> set output format of statistics [default: text] [possible values: text, json] ARGS: <cmd>... Enabled features: S3: true Redis: true Memcached: true GCS: true Azure: true </pre></html></WRAP> </WRAP> Rust の Cargo から sccache を利用するには **RUSTC_WRAPPER** 環境変数を設定する😉\\ <WRAP color_term> <WRAP color_command><code> $ echo 'export RUSTC_WRAPPER=$(which sccache)' >> .bashrc $ . .bashrc $ echo $RUSTC_WRAPPER </code></WRAP> <WRAP color_result><html><pre> /home/tomoyan/.cargo/bin/sccache </pre></html></WRAP> </WRAP> または、\\ <WRAP color_term> <WRAP color_command><code> $ echo 'export RUSTC_WRAPPER=$(which sccache)' >> .profile $ . .profile $ echo $RUSTC_WRAPPER </code></WRAP> <WRAP color_result><html><pre> /home/dietpi/.cargo/bin/sccache </pre></html></WRAP> </WRAP> sccache の統計情報を表示する🤔\\ <WRAP color_term> <WRAP color_command><code> $ sccache -s </code></WRAP> <WRAP color_result><html><pre> Compile requests 0 Compile requests executed 0 Cache hits 0 Cache misses 0 Cache timeouts 0 Cache read errors 0 Forced recaches 0 Cache write errors 0 Compilation failures 0 Cache errors 0 Non-cacheable compilations 0 Non-cacheable calls 0 Non-compilation calls 0 Unsupported compiler calls 0 Average cache write 0.000 s Average cache read miss 0.000 s Average cache read hit 0.000 s Failed distributed compilations 0 Cache location Local disk: "/home/tomoyan/.cache/sccache" </pre></html></WRAP> </WRAP> ==== Evcxr ==== [[git>google/evcxr|google/evcxr - Contribute to google/evcxr development by creating an account on GitHub.]]\\ [[python:jupyterlab:jupyterlab_and_rust#evcxr|Evcxr - JupyterLab + Rust 開発環境の構築]] を参照...🤤\\ ==== Rust Language Server ==== [[https://rust-analyzer.github.io/|rust-analyzer]]\\ [[https://rust-analyzer.github.io/manual.html|User Manual - rust-analyzer]] [[gtr>https://rust-analyzer.github.io/manual.html|翻訳]]\\ [[git>rust-lang/rust-analyzer|rust-lang/rust-analyzer: A Rust compiler front-end for IDEs]]\\ [[https://langserver.org/|Langserver.org]]\\ ==== Web Framework ==== [[https://trends.google.com/trends/explore?cat=31&date=2015-01-01%202023-09-07&q=Actix%20Web,Axum%20Rust,Rocket%20Rust,Gotham%20Rust,Tide%20Rust&hl=ja|Actix Web, Axum Rust, Rocket Rust, Gotham Rust, Tide Rust - 調べる - Google トレンド]]\\ [[https://www.shuttle.rs/blog/2023/08/23/rust-web-framework-comparison|Best Rust Web Frameworks to Use in 2023]] [[gtr>https://www.shuttle.rs/blog/2023/08/23/rust-web-framework-comparison|翻訳]]\\ ==== Web ベースの Rust シミュレーター ==== [[rust:wokwi|Wokwi]]\\ ==== uutils coreutils - Rust での GNU coreutils のクロスプラットフォーム再実装 ==== 公式: [[https://github.com/uutils/coreutils|uutils/coreutils: Cross-platform Rust rewrite of the GNU coreutils]]\\ === インストール === <WRAP color_term> <WRAP color_command><html><pre> <font color="#FF8700"><b>$</b></font> <font color="#26A269">cargo</font> install coreutils </pre></html></WRAP> <WRAP color_result_hlong><html><pre> <font color="#26A269"><b> Updating</b></font> crates.io index <font color="#26A269"><b> Downloaded</b></font> coreutils v0.0.25 <font color="#26A269"><b> Downloaded</b></font> 1 crate (1.5 MB) in 1.82s <font color="#26A269"><b> Installing</b></font> coreutils v0.0.25 <font color="#26A269"><b> Updating</b></font> crates.io index <font color="#26A269"><b> Downloaded</b></font> anstream v0.6.13 <font color="#26A269"><b> Downloaded</b></font> arrayref v0.3.7 <font color="#26A269"><b> Downloaded</b></font> anstyle v1.0.6 <font color="#26A269"><b> Downloaded</b></font> uu_df v0.0.25 <font color="#26A269"><b> Downloaded</b></font> bitflags v2.5.0 <font color="#26A269"><b> Downloaded</b></font> uu_echo v0.0.25 <font color="#26A269"><b> Downloaded</b></font> binary-heap-plus v0.5.0 <font color="#26A269"><b> Downloaded</b></font> uu_env v0.0.25 <font color="#26A269"><b> Downloaded</b></font> bigdecimal v0.4.3 <font color="#26A269"><b> Downloaded</b></font> console v0.15.8 <font color="#26A269"><b> Downloaded</b></font> anstyle-query v1.0.2 <font color="#26A269"><b> Downloaded</b></font> anstyle-parse v0.2.3 <font color="#26A269"><b> Downloaded</b></font> uu_expand v0.0.25 <font color="#26A269"><b> Downloaded</b></font> clap_complete v4.5.1 <font color="#26A269"><b> Downloaded</b></font> crossbeam-utils v0.8.19 <font color="#26A269"><b> Downloaded</b></font> uu_expr v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_fmt v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_false v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_factor v0.0.25 <font color="#26A269"><b> Downloaded</b></font> chrono v0.4.35 <font color="#26A269"><b> Downloaded</b></font> uu_fold v0.0.25 <font color="#26A269"><b> Downloaded</b></font> cpufeatures v0.2.12 <font color="#26A269"><b> Downloaded</b></font> uu_pr v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_join v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_rm v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_hashsum v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_readlink v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_od v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_shuf v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_head v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_tail v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_printenv v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_seq v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_ptx v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_mv v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_mktemp v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_paste v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_tac v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_mkdir v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_true v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_nl v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_printf v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_rmdir v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_ls v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_test v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_sum v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_ln v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_pwd v0.0.25 <font color="#26A269"><b> Downloaded</b></font> fastrand v2.0.2 <font color="#26A269"><b> Downloaded</b></font> uu_split v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_tr v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_tee v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_link v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_shred v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_tsort v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_sleep v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_realpath v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_touch v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_yes v0.0.25 <font color="#26A269"><b> Downloaded</b></font> xattr v1.3.1 <font color="#26A269"><b> Downloaded</b></font> clap_mangen v0.2.20 <font color="#26A269"><b> Downloaded</b></font> uutils_term_grid v0.3.0 <font color="#26A269"><b> Downloaded</b></font> uu_unexpand v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_truncate v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_sort v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_more v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_numfmt v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_dirname v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_uniq v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uucore v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_wc v0.0.25 <font color="#26A269"><b> Downloaded</b></font> wild v2.2.1 <font color="#26A269"><b> Downloaded</b></font> uu_dircolors v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_unlink v0.0.25 <font color="#26A269"><b> Downloaded</b></font> walkdir v2.5.0 <font color="#26A269"><b> Downloaded</b></font> uu_du v0.0.25 <font color="#26A269"><b> Downloaded</b></font> z85 v3.0.5 <font color="#26A269"><b> Downloaded</b></font> uu_vdir v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uuhelp_parser v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uucore_procs v0.0.25 <font color="#26A269"><b> Downloaded</b></font> const-random v0.1.18 <font color="#26A269"><b> Downloaded</b></font> cfg_aliases v0.1.1 <font color="#26A269"><b> Downloaded</b></font> data-encoding-macro-internal v0.1.12 <font color="#26A269"><b> Downloaded</b></font> data-encoding-macro v0.1.14 <font color="#26A269"><b> Downloaded</b></font> uu_base64 v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_basename v0.0.25 <font color="#26A269"><b> Downloaded</b></font> match_cfg v0.1.0 <font color="#26A269"><b> Downloaded</b></font> uu_comm v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_dir v0.0.25 <font color="#26A269"><b> Downloaded</b></font> uu_basenc v0.0.25 <font color="#26A269"><b> Downloaded</b></font> compare v0.1.0 <font color="#26A269"><b> Downloaded</b></font> constant_time_eq v0.3.0 <font color="#26A269"><b> Downloaded</b></font> clap_lex v0.7.0 <font color="#26A269"><b> Downloaded</b></font> hostname v0.3.1 <font color="#26A269"><b> Downloaded</b></font> uu_base32 v0.0.25 <font color="#26A269"><b> Downloaded</b></font> ctrlc v3.4.4 <font color="#26A269"><b> Downloaded</b></font> filetime v0.2.23 <font color="#26A269"><b> Downloaded</b></font> keccak v0.1.5 <font color="#26A269"><b> Downloaded</b></font> dlv-list v0.5.2 <font color="#26A269"><b> Downloaded</b></font> data-encoding v2.5.0 <font color="#26A269"><b> Downloaded</b></font> either v1.10.0 <font color="#26A269"><b> Downloaded</b></font> terminal_size v0.2.6 <font color="#26A269"><b> Downloaded</b></font> strsim v0.11.0 <font color="#26A269"><b> Downloaded</b></font> uu_date v0.0.25 <font color="#26A269"><b> Downloaded</b></font> self_cell v1.0.3 <font color="#26A269"><b> Downloaded</b></font> crossbeam-deque v0.8.5 <font color="#26A269"><b> Downloaded</b></font> uu_cut v0.0.25 <font color="#26A269"><b> Downloaded</b></font> phf_codegen v0.11.2 <font color="#26A269"><b> Downloaded</b></font> num-integer v0.1.46 <font color="#26A269"><b> Downloaded</b></font> phf_generator v0.11.2 <font color="#26A269"><b> Downloaded</b></font> uu_csplit v0.0.25 <font color="#26A269"><b> Downloaded</b></font> siphasher v0.3.11 <font color="#26A269"><b> Downloaded</b></font> lscolors v0.16.0 <font color="#26A269"><b> Downloaded</b></font> uu_cat v0.0.25 <font color="#26A269"><b> Downloaded</b></font> thiserror v1.0.58 <font color="#26A269"><b> Downloaded</b></font> pkg-config v0.3.30 <font color="#26A269"><b> Downloaded</b></font> phf_shared v0.11.2 <font color="#26A269"><b> Downloaded</b></font> md-5 v0.10.6 <font color="#26A269"><b> Downloaded</b></font> uu_cksum v0.0.25 <font color="#26A269"><b> Downloaded</b></font> phf v0.11.2 <font color="#26A269"><b> Downloaded</b></font> thiserror-impl v1.0.58 <font color="#26A269"><b> Downloaded</b></font> ordered-multimap v0.6.0 <font color="#26A269"><b> Downloaded</b></font> quick-error v2.0.1 <font color="#26A269"><b> Downloaded</b></font> os_display v0.1.3 <font color="#26A269"><b> Downloaded</b></font> getrandom v0.2.12 <font color="#26A269"><b> Downloaded</b></font> fs_extra v1.3.0 <font color="#26A269"><b> Downloaded</b></font> bytecount v0.6.7 <font color="#26A269"><b> Downloaded</b></font> blake2b_simd v1.0.2 <font color="#26A269"><b> Downloaded</b></font> iana-time-zone v0.1.60 <font color="#26A269"><b> Downloaded</b></font> rust-ini v0.19.0 <font color="#26A269"><b> Downloaded</b></font> roff v0.2.1 <font color="#26A269"><b> Downloaded</b></font> onig v6.4.0 <font color="#26A269"><b> Downloaded</b></font> uu_dd v0.0.25 <font color="#26A269"><b> Downloaded</b></font> nu-ansi-term v0.49.0 <font color="#26A269"><b> Downloaded</b></font> memmap2 v0.9.4 <font color="#26A269"><b> Downloaded</b></font> sm3 v0.4.2 <font color="#26A269"><b> Downloaded</b></font> uu_cp v0.0.25 <font color="#26A269"><b> Downloaded</b></font> clap v4.5.3 <font color="#26A269"><b> Downloaded</b></font> tempfile v3.10.1 <font color="#26A269"><b> Downloaded</b></font> num-traits v0.2.18 <font color="#26A269"><b> Downloaded</b></font> log v0.4.21 <font color="#26A269"><b> Downloaded</b></font> half v2.4.0 <font color="#26A269"><b> Downloaded</b></font> crossbeam-epoch v0.9.18 <font color="#26A269"><b> Downloaded</b></font> parse_datetime v0.5.0 <font color="#26A269"><b> Downloaded</b></font> notify v6.0.1 <font color="#26A269"><b> Downloaded</b></font> fundu-core v0.3.0 <font color="#26A269"><b> Downloaded</b></font> textwrap v0.16.1 <font color="#26A269"><b> Downloaded</b></font> rayon-core v1.12.1 <font color="#26A269"><b> Downloaded</b></font> indicatif v0.17.8 <font color="#26A269"><b> Downloaded</b></font> cc v1.0.90 <font color="#26A269"><b> Downloaded</b></font> fundu v2.0.0 <font color="#26A269"><b> Downloaded</b></font> crossbeam-channel v0.5.12 <font color="#26A269"><b> Downloaded</b></font> num-bigint v0.4.4 <font color="#26A269"><b> Downloaded</b></font> unicode-segmentation v1.11.0 <font color="#26A269"><b> Downloaded</b></font> mio v0.8.11 <font color="#26A269"><b> Downloaded</b></font> hashbrown v0.13.2 <font color="#26A269"><b> Downloaded</b></font> itertools v0.12.1 <font color="#26A269"><b> Downloaded</b></font> clap_builder v4.5.2 <font color="#26A269"><b> Downloaded</b></font> linux-raw-sys v0.4.13 <font color="#26A269"><b> Downloaded</b></font> rayon v1.10.0 <font color="#26A269"><b> Downloaded</b></font> blake3 v1.5.1 <font color="#26A269"><b> Downloaded</b></font> nix v0.28.0 <font color="#26A269"><b> Downloaded</b></font> rustix v0.37.27 <font color="#26A269"><b> Downloaded</b></font> rustix v0.38.32 <font color="#26A269"><b> Downloaded</b></font> onig_sys v69.8.1 <font color="#26A269"><b> Downloaded</b></font> sha3 v0.10.8 <font color="#26A269"><b> Downloaded</b></font> 166 crates (8.3 MB) in 5.35s (largest was `linux-raw-sys` at 1.5 MB) <font color="#26A269"><b> Compiling</b></font> libc v0.2.153 <font color="#26A269"><b> Compiling</b></font> cfg-if v1.0.0 <font color="#26A269"><b> Compiling</b></font> bitflags v2.5.0 <font color="#26A269"><b> Compiling</b></font> version_check v0.9.4 <font color="#26A269"><b> Compiling</b></font> typenum v1.17.0 <font color="#26A269"><b> Compiling</b></font> proc-macro2 v1.0.79 <font color="#26A269"><b> Compiling</b></font> generic-array v0.14.7 <font color="#26A269"><b> Compiling</b></font> rustix v0.38.32 <font color="#26A269"><b> Compiling</b></font> unicode-ident v1.0.12 <font color="#26A269"><b> Compiling</b></font> linux-raw-sys v0.4.13 <font color="#26A269"><b> Compiling</b></font> quote v1.0.35 <font color="#26A269"><b> Compiling</b></font> cc v1.0.90 <font color="#26A269"><b> Compiling</b></font> utf8parse v0.2.1 <font color="#26A269"><b> Compiling</b></font> memchr v2.7.1 <font color="#26A269"><b> Compiling</b></font> block-buffer v0.10.4 <font color="#26A269"><b> Compiling</b></font> crypto-common v0.1.6 <font color="#26A269"><b> Compiling</b></font> digest v0.10.7 <font color="#26A269"><b> Compiling</b></font> anstyle-parse v0.2.3 <font color="#26A269"><b> Compiling</b></font> anstyle v1.0.6 <font color="#26A269"><b> Compiling</b></font> colorchoice v1.0.0 <font color="#26A269"><b> Compiling</b></font> anstyle-query v1.0.2 <font color="#26A269"><b> Compiling</b></font> unicode-width v0.1.11 <font color="#26A269"><b> Compiling</b></font> anstream v0.6.13 <font color="#26A269"><b> Compiling</b></font> clap_lex v0.7.0 <font color="#26A269"><b> Compiling</b></font> cfg_aliases v0.1.1 <font color="#26A269"><b> Compiling</b></font> syn v1.0.109 <font color="#26A269"><b> Compiling</b></font> strsim v0.11.0 <font color="#26A269"><b> Compiling</b></font> nix v0.28.0 <font color="#26A269"><b> Compiling</b></font> terminal_size v0.3.0 <font color="#26A269"><b> Compiling</b></font> clap_builder v4.5.2 <font color="#26A269"><b> Compiling</b></font> blake3 v1.5.1 <font color="#26A269"><b> Compiling</b></font> syn v2.0.55 <font color="#26A269"><b> Compiling</b></font> constant_time_eq v0.3.0 <font color="#26A269"><b> Compiling</b></font> arrayref v0.3.7 <font color="#26A269"><b> Compiling</b></font> same-file v1.0.6 <font color="#26A269"><b> Compiling</b></font> thiserror v1.0.58 <font color="#26A269"><b> Compiling</b></font> cpufeatures v0.2.12 <font color="#26A269"><b> Compiling</b></font> either v1.10.0 <font color="#26A269"><b> Compiling</b></font> data-encoding v2.5.0 <font color="#26A269"><b> Compiling</b></font> arrayvec v0.7.4 <font color="#26A269"><b> Compiling</b></font> walkdir v2.5.0 <font color="#26A269"><b> Compiling</b></font> data-encoding-macro-internal v0.1.12 <font color="#26A269"><b> Compiling</b></font> clap v4.5.3 <font color="#26A269"><b> Compiling</b></font> uuhelp_parser v0.0.25 <font color="#26A269"><b> Compiling</b></font> thiserror-impl v1.0.58 <font color="#26A269"><b> Compiling</b></font> keccak v0.1.5 <font color="#26A269"><b> Compiling</b></font> once_cell v1.19.0 <font color="#26A269"><b> Compiling</b></font> sha3 v0.10.8 <font color="#26A269"><b> Compiling</b></font> data-encoding-macro v0.1.14 <font color="#26A269"><b> Compiling</b></font> uucore_procs v0.0.25 <font color="#26A269"><b> Compiling</b></font> blake2b_simd v1.0.2 <font color="#26A269"><b> Compiling</b></font> itertools v0.12.1 <font color="#26A269"><b> Compiling</b></font> sha1 v0.10.6 <font color="#26A269"><b> Compiling</b></font> sha2 v0.10.8 <font color="#26A269"><b> Compiling</b></font> xattr v1.3.1 <font color="#26A269"><b> Compiling</b></font> os_display v0.1.3 <font color="#26A269"><b> Compiling</b></font> md-5 v0.10.6 <font color="#26A269"><b> Compiling</b></font> sm3 v0.4.2 <font color="#26A269"><b> Compiling</b></font> z85 v3.0.5 <font color="#26A269"><b> Compiling</b></font> dunce v1.0.4 <font color="#26A269"><b> Compiling</b></font> hex v0.4.3 <font color="#26A269"><b> Compiling</b></font> glob v0.3.1 <font color="#26A269"><b> Compiling</b></font> wild v2.2.1 <font color="#26A269"><b> Compiling</b></font> autocfg v1.1.0 <font color="#26A269"><b> Compiling</b></font> uucore v0.0.25 <font color="#26A269"><b> Compiling</b></font> aho-corasick v1.1.3 <font color="#26A269"><b> Compiling</b></font> num-traits v0.2.18 <font color="#26A269"><b> Compiling</b></font> regex-syntax v0.8.2 <font color="#26A269"><b> Compiling</b></font> crossbeam-utils v0.8.19 <font color="#26A269"><b> Compiling</b></font> crunchy v0.2.2 <font color="#26A269"><b> Compiling</b></font> iana-time-zone v0.1.60 <font color="#26A269"><b> Compiling</b></font> chrono v0.4.35 <font color="#26A269"><b> Compiling</b></font> regex-automata v0.4.6 <font color="#26A269"><b> Compiling</b></font> getrandom v0.2.12 <font color="#26A269"><b> Compiling</b></font> bitflags v1.3.2 <font color="#26A269"><b> Compiling</b></font> tiny-keccak v2.0.2 <font color="#26A269"><b> Compiling</b></font> rand_core v0.6.4 <font color="#26A269"><b> Compiling</b></font> ppv-lite86 v0.2.17 <font color="#26A269"><b> Compiling</b></font> rand_chacha v0.3.1 <font color="#26A269"><b> Compiling</b></font> log v0.4.21 <font color="#26A269"><b> Compiling</b></font> signal-hook v0.3.17 <font color="#26A269"><b> Compiling</b></font> number_prefix v0.4.0 <font color="#26A269"><b> Compiling</b></font> const-random-macro v0.1.16 <font color="#26A269"><b> Compiling</b></font> rand v0.8.5 <font color="#26A269"><b> Compiling</b></font> mio v0.8.11 <font color="#26A269"><b> Compiling</b></font> lock_api v0.4.11 <font color="#26A269"><b> Compiling</b></font> num-bigint v0.4.4 <font color="#26A269"><b> Compiling</b></font> signal-hook-registry v1.4.1 <font color="#26A269"><b> Compiling</b></font> siphasher v0.3.11 <font color="#26A269"><b> Compiling</b></font> parking_lot_core v0.9.9 <font color="#26A269"><b> Compiling</b></font> pkg-config v0.3.30 <font color="#26A269"><b> Compiling</b></font> portable-atomic v1.6.0 <font color="#26A269"><b> Compiling</b></font> regex v1.10.4 <font color="#26A269"><b> Compiling</b></font> io-lifetimes v1.0.11 <font color="#26A269"><b> Compiling</b></font> smallvec v1.13.2 <font color="#26A269"><b> Compiling</b></font> onig_sys v69.8.1 <font color="#26A269"><b> Compiling</b></font> phf_shared v0.11.2 <font color="#26A269"><b> Compiling</b></font> const-random v0.1.18 <font color="#26A269"><b> Compiling</b></font> crossbeam-epoch v0.9.18 <font color="#26A269"><b> Compiling</b></font> num-integer v0.1.46 <font color="#26A269"><b> Compiling</b></font> filetime v0.2.23 <font color="#26A269"><b> Compiling</b></font> rayon-core v1.12.1 <font color="#26A269"><b> Compiling</b></font> libm v0.2.8 <font color="#26A269"><b> Compiling</b></font> rustix v0.37.27 <font color="#26A269"><b> Compiling</b></font> match_cfg v0.1.0 <font color="#26A269"><b> Compiling</b></font> scopeguard v1.2.0 <font color="#26A269"><b> Compiling</b></font> nu-ansi-term v0.49.0 <font color="#26A269"><b> Compiling</b></font> lazy_static v1.4.0 <font color="#26A269"><b> Compiling</b></font> console v0.15.8 <font color="#26A269"><b> Compiling</b></font> lscolors v0.16.0 <font color="#26A269"><b> Compiling</b></font> hostname v0.3.1 <font color="#26A269"><b> Compiling</b></font> crossbeam-deque v0.8.5 <font color="#26A269"><b> Compiling</b></font> dlv-list v0.5.2 <font color="#26A269"><b> Compiling</b></font> phf_generator v0.11.2 <font color="#26A269"><b> Compiling</b></font> bigdecimal v0.4.3 <font color="#26A269"><b> Compiling</b></font> uutils_term_grid v0.3.0 <font color="#26A269"><b> Compiling</b></font> inotify-sys v0.1.5 <font color="#26A269"><b> Compiling</b></font> fundu-core v0.3.0 <font color="#26A269"><b> Compiling</b></font> fastrand v2.0.2 <font color="#26A269"><b> Compiling</b></font> linux-raw-sys v0.3.8 <font color="#26A269"><b> Compiling</b></font> hashbrown v0.13.2 <font color="#26A269"><b> Compiling</b></font> ordered-multimap v0.6.0 <font color="#26A269"><b> Compiling</b></font> fundu v2.0.0 <font color="#26A269"><b> Compiling</b></font> tempfile v3.10.1 <font color="#26A269"><b> Compiling</b></font> inotify v0.9.6 <font color="#26A269"><b> Compiling</b></font> uu_ls v0.0.25 <font color="#26A269"><b> Compiling</b></font> indicatif v0.17.8 <font color="#26A269"><b> Compiling</b></font> uu_factor v0.0.25 <font color="#26A269"><b> Compiling</b></font> parking_lot v0.12.1 <font color="#26A269"><b> Compiling</b></font> phf_codegen v0.11.2 <font color="#26A269"><b> Compiling</b></font> signal-hook-mio v0.2.3 <font color="#26A269"><b> Compiling</b></font> parse_datetime v0.5.0 <font color="#26A269"><b> Compiling</b></font> crossbeam-channel v0.5.12 <font color="#26A269"><b> Compiling</b></font> uu_base32 v0.0.25 <font color="#26A269"><b> Compiling</b></font> quick-error v2.0.1 <font color="#26A269"><b> Compiling</b></font> compare v0.1.0 <font color="#26A269"><b> Compiling</b></font> minimal-lexical v0.2.1 <font color="#26A269"><b> Compiling</b></font> binary-heap-plus v0.5.0 <font color="#26A269"><b> Compiling</b></font> notify v6.0.1 <font color="#26A269"><b> Compiling</b></font> crossterm v0.27.0 <font color="#26A269"><b> Compiling</b></font> nom v7.1.3 <font color="#26A269"><b> Compiling</b></font> rayon v1.10.0 <font color="#26A269"><b> Compiling</b></font> coreutils v0.0.25 <font color="#26A269"><b> Compiling</b></font> terminal_size v0.2.6 <font color="#26A269"><b> Compiling</b></font> rust-ini v0.19.0 <font color="#26A269"><b> Compiling</b></font> onig v6.4.0 <font color="#26A269"><b> Compiling</b></font> bstr v1.9.1 <font color="#26A269"><b> Compiling</b></font> ctrlc v3.4.4 <font color="#26A269"><b> Compiling</b></font> memmap2 v0.9.4 <font color="#26A269"><b> Compiling</b></font> half v2.4.0 <font color="#26A269"><b> Compiling</b></font> roff v0.2.1 <font color="#26A269"><b> Compiling</b></font> smawk v0.3.2 <font color="#26A269"><b> Compiling</b></font> fs_extra v1.3.0 <font color="#26A269"><b> Compiling</b></font> unicode-linebreak v0.1.5 <font color="#26A269"><b> Compiling</b></font> fnv v1.0.7 <font color="#26A269"><b> Compiling</b></font> self_cell v1.0.3 <font color="#26A269"><b> Compiling</b></font> gcd v2.3.0 <font color="#26A269"><b> Compiling</b></font> unicode-segmentation v1.11.0 <font color="#26A269"><b> Compiling</b></font> bytecount v0.6.7 <font color="#26A269"><b> Compiling</b></font> byteorder v1.5.0 <font color="#26A269"><b> Compiling</b></font> uu_dd v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_wc v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_od v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_more v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_sort v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_mv v0.0.25 <font color="#26A269"><b> Compiling</b></font> textwrap v0.16.1 <font color="#26A269"><b> Compiling</b></font> uu_cut v0.0.25 <font color="#26A269"><b> Compiling</b></font> clap_mangen v0.2.20 <font color="#26A269"><b> Compiling</b></font> uu_tac v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_expr v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_env v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_seq v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_tr v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_tail v0.0.25 <font color="#26A269"><b> Compiling</b></font> phf v0.11.2 <font color="#26A269"><b> Compiling</b></font> uu_cp v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_pr v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_basenc v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_base64 v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_touch v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_date v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_dir v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_vdir v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_mktemp v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_sleep v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_ptx v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_csplit v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_hashsum v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_nl v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_shuf v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_shred v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_du v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_readlink v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_link v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_split v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_rmdir v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_printf v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_rm v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_yes v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_uniq v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_dirname v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_realpath v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_df v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_join v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_dircolors v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_sum v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_paste v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_tsort v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_numfmt v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_true v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_expand v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_unexpand v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_mkdir v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_false v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_cat v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_pwd v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_unlink v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_basename v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_printenv v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_tee v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_cksum v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_test v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_fold v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_ln v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_head v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_comm v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_echo v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_fmt v0.0.25 <font color="#26A269"><b> Compiling</b></font> uu_truncate v0.0.25 <font color="#26A269"><b> Compiling</b></font> clap_complete v4.5.1 <font color="#26A269"><b> Finished</b></font> release [optimized] target(s) in 5m 36s <font color="#26A269"><b> Installing</b></font> /home/tomoyan/.cargo/bin/coreutils <font color="#26A269"><b> Installed</b></font> package `coreutils v0.0.25` (executable `coreutils`) </pre></html></WRAP> </WRAP> === 使い方 === <WRAP color_term> <WRAP color_command><html><pre> <font color="#FF8700"><b>$</b></font> <font color="#26A269">coreutils</font> du <font color="#A347BA">--help</font> </pre></html></WRAP> <WRAP color_result_hlong><html><pre> Estimate file space usage <u style="text-decoration-style:single"><b>Usage:</b></u> coreutils du [OPTION]... [FILE]... coreutils du [OPTION]... --files0-from=F <u style="text-decoration-style:single"><b>Options:</b></u> <b>--help</b> Print help information. <b>-a</b>, <b>--all</b> write counts for all files, not just directories <b>--apparent-size</b> print apparent sizes, rather than disk usage although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the like <b>-B</b>, <b>--block-size</b> <SIZE> scale sizes by SIZE before printing them. E.g., '-BM' prints sizes in units of 1,048,576 bytes. See SIZE format below. <b>-b</b>, <b>--bytes</b> equivalent to '--apparent-size --block-size=1' <b>-c</b>, <b>--total</b> produce a grand total <b>-d</b>, <b>--max-depth</b> <N> print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize <b>-h</b>, <b>--human-readable</b> print sizes in human readable format (e.g., 1K 234M 2G) <b>--inodes</b> list inode usage information instead of block usage like --block-size=1K <b>-k</b> like --block-size=1K <b>-l</b>, <b>--count-links</b> count sizes many times if hard linked <b>-L</b>, <b>--dereference</b> follow all symbolic links <b>-D</b>, <b>--dereference-args</b> follow only symlinks that are listed on the command line [short aliases: H] <b>-P</b>, <b>--no-dereference</b> don't follow any symbolic links (this is the default) <b>-m</b> like --block-size=1M <b>-0</b>, <b>--null</b> end each output line with 0 byte rather than newline <b>-S</b>, <b>--separate-dirs</b> do not include size of subdirectories <b>-s</b>, <b>--summarize</b> display only a total for each argument <b>--si</b> like -h, but use powers of 1000 not 1024 <b>-x</b>, <b>--one-file-system</b> skip directories on different file systems <b>-t</b>, <b>--threshold</b> <SIZE> exclude entries smaller than SIZE if positive, or entries greater than SIZE if negative <b>-v</b>, <b>--verbose</b> verbose mode (option not present in GNU/Coreutils) <b>--exclude</b> <PATTERN> exclude files that match PATTERN <b>-X</b>, <b>--exclude-from</b> <FILE> exclude files that match any pattern in FILE <b>--files0-from</b> <FILE> summarize device usage of the NUL-terminated file names specified in file F; if F is -, then read names from standard input <b>--time</b>[=<WORD>...] show time of the last modification of any file in the directory, or any of its subdirectories. If WORD is given, show time as WORD instead of modification time: atime, access, use, ctime, status, birth or creation [possible values: atime, access, use, ctime, status, birth, creation] <b>--time-style</b> <STYLE> show times using style STYLE: full-iso, long-iso, iso, +FORMAT FORMAT is interpreted like 'date' <b>-V</b>, <b>--version</b> Print version Display values are in units of the first available SIZE from --block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set). SIZE is an integer and optional unit (example: 10M is 10*1024*1024). Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers of 1000). PATTERN allows some advanced exclusions. For example, the following syntaxes are supported: ? will match only one character * will match zero or more characters {a,b} will match a or b </pre></html></WRAP> </WRAP> ===== トラブルシューティング ===== ==== [sccache] error: failed to run custom build command for `openssl-sys v0.9.75` でビルドがエラー終了する ==== <WRAP color_term> <WRAP color_command><code> $ cargo install sccache </code></WRAP> <WRAP color_result_long><html><pre> <b class=GRN>Updating</b> crates.io index <b class=GRN>Downloaded</b> sccache v0.3.0 <b class=GRN>Downloaded</b> 1 crate (272.5 KB) in 1.17s <b class=GRN>Installing</b> sccache v0.3.0 <b class=GRN>Downloaded</b> bitflags v1.3.2 <b class=HIY>...</b> <b class=GRN>Compiling</b> rand v0.8.5 <b class=GRN>Compiling</b> rand v0.7.3 <b class=RED>error</b>: failed to run custom build command for `openssl-sys v0.9.75` Caused by: process didn't exit successfully: `/tmp/cargo-installCiIUHG/release/build/openssl-sys-7bf1e8bf5be1b2d6/build-script-main` (exit status: 101) --- stdout cargo:rustc-cfg=const_fn cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=OPENSSL_STATIC cargo:rerun-if-env-changed=OPENSSL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit status: 1\nerror: could not find system library 'openssl' required by the 'openssl-sys' crate\n\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'openssl', required by 'virtual:world', not found\n" --- stderr thread 'main' panicked at ' Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it, you can set the `OPENSSL_DIR` environment variable for the compilation process. Make sure you also have the development packages of openssl installed. For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora. If you're in a situation where you think the directory *should* be found automatically, please open a bug at https://github.com/sfackler/rust-openssl and include information about your system as well as this message. $HOST = x86_64-unknown-linux-gnu $TARGET = x86_64-unknown-linux-gnu openssl-sys = 0.9.75 ', /home/tomoyan/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.75/build/find_normal.rs:191:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace <b class=HIY>warning</b>: build failed, waiting for other jobs to finish... <b class=RED>error</b>: failed to compile `sccache v0.3.0`, intermediate artifacts can be found at `/tmp/cargo-installCiIUHG` </pre></html></WRAP> </WRAP> Ubuntu では <html><code>libssl-dev</code></html> を、Fedora では <html><code>openssl-devel</code></html> をインストールしてから再実行する🤔\\ <WRAP color_term> <WRAP color_command><code> $ sudo dnf install openssl-devel </code></WRAP> <WRAP color_result_long><html><pre> Fedora 36 - x86_64 - Updates 5.8 kB/s | 5.5 kB 00:00 Fedora 36 - x86_64 - Updates 273 kB/s | 515 kB 00:01 Fedora Modular 36 - x86_64 - Updates 6.7 kB/s | 4.8 kB 00:00 依存関係が解決しました。 ============================================================================================================== パッケージ アーキテクチャー バージョン リポジトリー サイズ ============================================================================================================== インストール: <b class=GRN>openssl-devel</b> x86_64 1:3.0.5-1.fc36 updates 3.0 M トランザクションの概要 ============================================================================================================== インストール 1 パッケージ ダウンロードサイズの合計: 3.0 M インストール後のサイズ: 4.6 M これでよろしいですか? [y/N]: y パッケージのダウンロード: openssl-devel-3.0.5-1.fc36.x86_64.rpm 2.3 MB/s | 3.0 MB 00:01 -------------------------------------------------------------------------------------------------------------- 合計 1.5 MB/s | 3.0 MB 00:02 トランザクションの確認を実行中 トランザクションの確認に成功しました。 トランザクションのテストを実行中 トランザクションのテストに成功しました。 トランザクションを実行中 準備 : 1/1 インストール中 : openssl-devel-1:3.0.5-1.fc36.x86_64 1/1 scriptletの実行中: openssl-devel-1:3.0.5-1.fc36.x86_64 1/1 検証 : openssl-devel-1:3.0.5-1.fc36.x86_64 1/1 インストール済み: openssl-devel-1:3.0.5-1.fc36.x86_64 完了しました! </pre></html></WRAP> </WRAP> ==== [sccache] No space left on device (os error 28) でビルドがエラー終了する ==== <WRAP color_term> <WRAP color_command><code> $ cargo install sccache </code></WRAP> <WRAP color_result><html><pre> <b class=GRN>Updating</b> crates.io index <b class=GRN>Downloaded</b> sccache v0.3.0 <b class=GRN>Downloaded</b> 1 crate (272.5 KB) in 2.44s <b class=GRN>Installing</b> sccache v0.3.0 <b class=GRN>Downloaded</b> async-trait v0.1.56 <b class=HIY>...</b> <b class=GRN>Compiling</b> local-encoding v0.2.0 <b class=GRN>Compiling</b> tokio v1.19.2 <b class=RED>error</b>: failed to write /tmp/cargo-installcx83Fu/release/deps/rmetaqzpZIF/lib.rmeta: No space left on device (os error 28) <b class=RED>error</b>: could not compile `tokio` due to previous error <b class=HIY>warning</b>: build failed, waiting for other jobs to finish... <b class=RED>error</b>: failed to compile `sccache v0.3.0`, intermediate artifacts can be found at `/tmp/cargo-installcx83Fu` </pre></html></WRAP> </WRAP> **/tmp** が溢れている😱\\ <WRAP color_term> <WRAP color_command><code> $ df -BM </code></WRAP> <WRAP color_result><html><pre> Filesystem 1M-blocks Used Available Use% Mounted on /dev/root 118989M 13156M 101048M 12% / devtmpfs 183M 0M 183M 0% /dev tmpfs 215M 0M 215M 0% /dev/shm tmpfs 86M 9M 78M 10% /run tmpfs 5M 1M 5M 1% /run/lock tmpfs 428M 426M 3M <b class=RED>100%</b> /tmp tmpfs 50M 1M 50M 1% /var/log /dev/mmcblk0p1 127M 51M 76M 41% /boot tmpfs 43M 1M 43M 1% /run/user/0 tmpfs 43M 1M 43M 1% /run/user/106 tmpfs 43M 1M 43M 1% /run/user/1000 </pre></html></WRAP> </WRAP> **tmp** を掃除する😊\\ <WRAP color_term> <WRAP color_command><code> $ rm -rf /tmp/cargo-* $ rm -rf /var/tmp/cargo-* </code></WRAP> </WRAP> 一時作業ディレクトリを **/var/tmp** にしてビルドを再実行する😊\\ <WRAP color_term> <WRAP color_command><code> $ TMPDIR=/var/tmp cargo install sccache </code></WRAP> <WRAP color_result><html><pre> <b class=GRN>Updating</b> crates.io index <b class=GRN>Installing</b> sccache v0.3.0 <b class=GRN>Compiling</b> libc v0.2.126 <b class=HIY>...</b> </pre></html></WRAP> </WRAP> ===== Rust のアンインストール ===== <WRAP color_term> <WRAP color_command><html><pre> <b class=GRN>$</b> <b class=HIY>rustup</b> self uninstall </pre></html></WRAP> <WRAP color_result><html><pre> <b class=BOLD>Thanks for hacking in Rust!</b> This will uninstall all Rust toolchains and data, and remove <b class=BOLD>$HOME/.cargo/bin</b> from your <b class=BOLD>PATH</b> environment variable. Continue? (y/N) y <b class=DiYE>-> y を入力して Enter</b> <b class=BOLD>info:</b> removing rustup home <b class=BOLD>info:</b> removing cargo home <b class=BOLD>info:</b> removing rustup binaries <b class=BOLD>info:</b> rustup is uninstalled </pre></html></WRAP> </WRAP> ===== 参考文献 ===== [[https://blog.mtb-production.info/entry/2020/11/19/021415|Rustをインストールして、Hello Worldしただけの話 - matobaの備忘録]]\\ [[https://zenn.dev/suauiya/books/ef2d2c67c546361e4518/viewer/4bc94a19cf74da37bf8f|インストール後にrustupを使ってすること|WindowsでRustの開発環境を構築する(not on WSL)/おまけのみ有料]]\\ [[https://zenn.dev/esaka/scraps/e9baa5851f6109|Rustでreplやjupyter-notebook使う]]\\ [[https://zenn.dev/kt3k/articles/d557cc874961ab|Rust プロジェクトの GitHub Actions で incremental build をするためのテクニック]]\\ [[https://qiita.com/manontroppo1974/items/a6bcef67285c10edff77|Ubuntu上でRaspberry Pi Zero向けクロスコンパイル事始め - Qiita]]\\ [[https://wiki.archlinux.jp/index.php/Rust|Rust - ArchWiki]]\\ [[https://esp-rs.github.io/book/|Introduction - The Rust on ESP Book]]\\ [[md>codex/rust-101-everything-you-need-to-know-about-rust-f3dd0ae99f4c|Rust 101 — Everything you need to know about Rust | by Nishant Aanjaney Jalan | CodeX | Medium]]\\ [[https://www.devopsschool.com/blog/what-is-rust-and-how-it-works-an-overview-and-its-use-cases/|What is Rust and How it works? An Overview and Its Use Cases - DevOpsSchool.com]]\\ [[md>@adwilson0286/my-thoughts-on-programming-a-raspberry-pi-pico-with-rust-29d642898544|My Thoughts on Programming a Raspberry Pi Pico with Rust | by Alex Wilson | Medium]]\\ [[dt>kgrech/6-things-you-can-do-with-the-cow-in-rust-4l55|6 things you can do with the Cow 🐄 in Rust 🦀 - DEV Community]] [[gtr>https://dev.to/kgrech/6-things-you-can-do-with-the-cow-in-rust-4l55|翻訳]]\\ [[https://gihyo.jp/article/2023/07/monthly-python-2307|PythonとRustの融合:PyO3/maturinを使ったPythonバインディングの作成入門 | gihyo.jp]]\\ ==== 付録 ==== インストーラスクリプトの内容\\ <WRAP mincode><code> $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | cat </code></WRAP> <WRAP mincode_long><code bash> #!/bin/sh # shellcheck shell=dash # This is just a little script that can be downloaded from the internet to # install rustup. It just does platform detection, downloads the installer # and runs it. # It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local` # extension. Note: Most shells limit `local` to 1 var per line, contra bash. if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then # The version of ksh93 that ships with many illumos systems does not # support the "local" extension. Print a message rather than fail in # subtle ways later on: echo 'rustup does not work with this ksh93 version; please try bash!' >&2 exit 1 fi set -u # If RUSTUP_UPDATE_ROOT is unset or empty, default it. RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}" #XXX: If you change anything here, please make the same changes in setup_mode.rs usage() { cat 1>&2 <<EOF rustup-init 1.24.3 (c1c769109 2021-05-31) The installer for rustup USAGE: rustup-init [FLAGS] [OPTIONS] FLAGS: -v, --verbose Enable verbose output -q, --quiet Disable progress output -y Disable confirmation prompt. --no-modify-path Don't configure the PATH environment variable -h, --help Prints help information -V, --version Prints version information OPTIONS: --default-host <default-host> Choose a default host triple --default-toolchain <default-toolchain> Choose a default toolchain to install --default-toolchain none Do not install any toolchains --profile [minimal|default|complete] Choose a profile -c, --component <components>... Component name to also install -t, --target <targets>... Target name to also install EOF } main() { downloader --check need_cmd uname need_cmd mktemp need_cmd chmod need_cmd mkdir need_cmd rm need_cmd rmdir get_architecture || return 1 local _arch="$RETVAL" assert_nz "$_arch" "arch" local _ext="" case "$_arch" in *windows*) _ext=".exe" ;; esac local _url="${RUSTUP_UPDATE_ROOT}/dist/${_arch}/rustup-init${_ext}" local _dir _dir="$(ensure mktemp -d)" local _file="${_dir}/rustup-init${_ext}" local _ansi_escapes_are_valid=false if [ -t 2 ]; then if [ "${TERM+set}" = 'set' ]; then case "$TERM" in xterm*|rxvt*|urxvt*|linux*|vt*) _ansi_escapes_are_valid=true ;; esac fi fi # check if we have to use /dev/tty to prompt the user local need_tty=yes for arg in "$@"; do case "$arg" in -h|--help) usage exit 0 ;; -y) # user wants to skip the prompt -- we don't need /dev/tty need_tty=no ;; *) ;; esac done if $_ansi_escapes_are_valid; then printf "\33[1minfo:\33[0m downloading installer\n" 1>&2 else printf '%s\n' 'info: downloading installer' 1>&2 fi ensure mkdir -p "$_dir" ensure downloader "$_url" "$_file" "$_arch" ensure chmod u+x "$_file" if [ ! -x "$_file" ]; then printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2 printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./rustup-init${_ext}." 1>&2 exit 1 fi if [ "$need_tty" = "yes" ]; then # The installer is going to want to ask for confirmation by # reading stdin. This script was piped into `sh` though and # doesn't have stdin to pass to its children. Instead we're going # to explicitly connect /dev/tty to the installer's stdin. if [ ! -t 1 ]; then err "Unable to run interactively. Run with -y to accept defaults, --help for additional options" fi ignore "$_file" "$@" < /dev/tty else ignore "$_file" "$@" fi local _retval=$? ignore rm "$_file" ignore rmdir "$_dir" return "$_retval" } check_proc() { # Check for /proc by looking for the /proc/self/exe link # This is only run on Linux if ! test -L /proc/self/exe ; then err "fatal: Unable to find /proc/self/exe. Is /proc mounted? Installation cannot proceed without /proc." fi } get_bitness() { need_cmd head # Architecture detection without dependencies beyond coreutils. # ELF files start out "\x7fELF", and the following byte is # 0x01 for 32-bit and # 0x02 for 64-bit. # The printf builtin on some shells like dash only supports octal # escape sequences, so we use those. local _current_exe_head _current_exe_head=$(head -c 5 /proc/self/exe ) if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then echo 32 elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then echo 64 else err "unknown platform bitness" fi } is_host_amd64_elf() { need_cmd head need_cmd tail # ELF e_machine detection without dependencies beyond coreutils. # Two-byte field at offset 0x12 indicates the CPU, # but we're interested in it being 0x3E to indicate amd64, or not that. local _current_exe_machine _current_exe_machine=$(head -c 19 /proc/self/exe | tail -c 1) [ "$_current_exe_machine" = "$(printf '\076')" ] } get_endianness() { local cputype=$1 local suffix_eb=$2 local suffix_el=$3 # detect endianness without od/hexdump, like get_bitness() does. need_cmd head need_cmd tail local _current_exe_endianness _current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)" if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then echo "${cputype}${suffix_el}" elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then echo "${cputype}${suffix_eb}" else err "unknown platform endianness" fi } get_architecture() { local _ostype _cputype _bitness _arch _clibtype _ostype="$(uname -s)" _cputype="$(uname -m)" _clibtype="gnu" if [ "$_ostype" = Linux ]; then if [ "$(uname -o)" = Android ]; then _ostype=Android fi if ldd --version 2>&1 | grep -q 'musl'; then _clibtype="musl" fi fi if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then # Darwin `uname -m` lies if sysctl hw.optional.x86_64 | grep -q ': 1'; then _cputype=x86_64 fi fi if [ "$_ostype" = SunOS ]; then # Both Solaris and illumos presently announce as "SunOS" in "uname -s" # so use "uname -o" to disambiguate. We use the full path to the # system uname in case the user has coreutils uname first in PATH, # which has historically sometimes printed the wrong value here. if [ "$(/usr/bin/uname -o)" = illumos ]; then _ostype=illumos fi # illumos systems have multi-arch userlands, and "uname -m" reports the # machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86 # systems. Check for the native (widest) instruction set on the # running kernel: if [ "$_cputype" = i86pc ]; then _cputype="$(isainfo -n)" fi fi case "$_ostype" in Android) _ostype=linux-android ;; Linux) check_proc _ostype=unknown-linux-$_clibtype _bitness=$(get_bitness) ;; FreeBSD) _ostype=unknown-freebsd ;; NetBSD) _ostype=unknown-netbsd ;; DragonFly) _ostype=unknown-dragonfly ;; Darwin) _ostype=apple-darwin ;; illumos) _ostype=unknown-illumos ;; MINGW* | MSYS* | CYGWIN*) _ostype=pc-windows-gnu ;; *) err "unrecognized OS type: $_ostype" ;; esac case "$_cputype" in i386 | i486 | i686 | i786 | x86) _cputype=i686 ;; xscale | arm) _cputype=arm if [ "$_ostype" = "linux-android" ]; then _ostype=linux-androideabi fi ;; armv6l) _cputype=arm if [ "$_ostype" = "linux-android" ]; then _ostype=linux-androideabi else _ostype="${_ostype}eabihf" fi ;; armv7l | armv8l) _cputype=armv7 if [ "$_ostype" = "linux-android" ]; then _ostype=linux-androideabi else _ostype="${_ostype}eabihf" fi ;; aarch64 | arm64) _cputype=aarch64 ;; x86_64 | x86-64 | x64 | amd64) _cputype=x86_64 ;; mips) _cputype=$(get_endianness mips '' el) ;; mips64) if [ "$_bitness" -eq 64 ]; then # only n64 ABI is supported for now _ostype="${_ostype}abi64" _cputype=$(get_endianness mips64 '' el) fi ;; ppc) _cputype=powerpc ;; ppc64) _cputype=powerpc64 ;; ppc64le) _cputype=powerpc64le ;; s390x) _cputype=s390x ;; riscv64) _cputype=riscv64gc ;; *) err "unknown CPU type: $_cputype" esac # Detect 64-bit linux with 32-bit userland if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then case $_cputype in x86_64) if [ -n "${RUSTUP_CPUTYPE:-}" ]; then _cputype="$RUSTUP_CPUTYPE" else { # 32-bit executable for amd64 = x32 if is_host_amd64_elf; then { echo "This host is running an x32 userland; as it stands, x32 support is poor," 1>&2 echo "and there isn't a native toolchain -- you will have to install" 1>&2 echo "multiarch compatibility with i686 and/or amd64, then select one" 1>&2 echo "by re-running this script with the RUSTUP_CPUTYPE environment variable" 1>&2 echo "set to i686 or x86_64, respectively." 1>&2 echo 1>&2 echo "You will be able to add an x32 target after installation by running" 1>&2 echo " rustup target add x86_64-unknown-linux-gnux32" 1>&2 exit 1 }; else _cputype=i686 fi }; fi ;; mips64) _cputype=$(get_endianness mips '' el) ;; powerpc64) _cputype=powerpc ;; aarch64) _cputype=armv7 if [ "$_ostype" = "linux-android" ]; then _ostype=linux-androideabi else _ostype="${_ostype}eabihf" fi ;; riscv64gc) err "riscv64 with 32-bit userland unsupported" ;; esac fi # Detect armv7 but without the CPU features Rust needs in that build, # and fall back to arm. # See https://github.com/rust-lang/rustup.rs/issues/587. if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then # At least one processor does not have NEON. _cputype=arm fi fi _arch="${_cputype}-${_ostype}" RETVAL="$_arch" } say() { printf 'rustup: %s\n' "$1" } err() { say "$1" >&2 exit 1 } need_cmd() { if ! check_cmd "$1"; then err "need '$1' (command not found)" fi } check_cmd() { command -v "$1" > /dev/null 2>&1 } assert_nz() { if [ -z "$1" ]; then err "assert_nz $2"; fi } # Run a command that should never fail. If the command fails execution # will immediately terminate with an error showing the failing # command. ensure() { if ! "$@"; then err "command failed: $*"; fi } # This is just for indicating that commands' results are being # intentionally ignored. Usually, because it's being executed # as part of error handling. ignore() { "$@" } # This wraps curl or wget. Try curl first, if not installed, # use wget instead. downloader() { local _dld local _ciphersuites local _err local _status if check_cmd curl; then _dld=curl elif check_cmd wget; then _dld=wget else _dld='curl or wget' # to be used in error message of need_cmd fi if [ "$1" = --check ]; then need_cmd "$_dld" elif [ "$_dld" = curl ]; then get_ciphersuites_for_curl _ciphersuites="$RETVAL" if [ -n "$_ciphersuites" ]; then _err=$(curl --proto '=https' --tlsv1.2 --ciphers "$_ciphersuites" --silent --show-error --fail --location "$1" --output "$2" 2>&1) _status=$? else echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" if ! check_help_for "$3" curl --proto --tlsv1.2; then echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" _err=$(curl --silent --show-error --fail --location "$1" --output "$2" 2>&1) _status=$? else _err=$(curl --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1) _status=$? fi fi if [ -n "$_err" ]; then echo "$_err" >&2 if echo "$_err" | grep -q 404$; then err "installer for platform '$3' not found, this may be unsupported" fi fi return $_status elif [ "$_dld" = wget ]; then get_ciphersuites_for_wget _ciphersuites="$RETVAL" if [ -n "$_ciphersuites" ]; then _err=$(wget --https-only --secure-protocol=TLSv1_2 --ciphers "$_ciphersuites" "$1" -O "$2" 2>&1) _status=$? else echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" if ! check_help_for "$3" wget --https-only --secure-protocol; then echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" _err=$(wget "$1" -O "$2" 2>&1) _status=$? else _err=$(wget --https-only --secure-protocol=TLSv1_2 "$1" -O "$2" 2>&1) _status=$? fi fi if [ -n "$_err" ]; then echo "$_err" >&2 if echo "$_err" | grep -q ' 404 Not Found$'; then err "installer for platform '$3' not found, this may be unsupported" fi fi return $_status else err "Unknown downloader" # should not reach here fi } check_help_for() { local _arch local _cmd local _arg _arch="$1" shift _cmd="$1" shift local _category if "$_cmd" --help | grep -q 'For all options use the manual or "--help all".'; then _category="all" else _category="" fi case "$_arch" in *darwin*) if check_cmd sw_vers; then case $(sw_vers -productVersion) in 10.*) # If we're running on macOS, older than 10.13, then we always # fail to find these options to force fallback if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then # Older than 10.13 echo "Warning: Detected macOS platform older than 10.13" return 1 fi ;; 11.*) # We assume Big Sur will be OK for now ;; *) # Unknown product version, warn and continue echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)" echo "Warning TLS capabilities detection may fail" ;; esac fi ;; esac for _arg in "$@"; do if ! "$_cmd" --help $_category | grep -q -- "$_arg"; then return 1 fi done true # not strictly needed } # Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites # if support by local tools is detected. Detection currently supports these curl backends: # GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. get_ciphersuites_for_curl() { if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then # user specified custom cipher suites, assume they know what they're doing RETVAL="$RUSTUP_TLS_CIPHERSUITES" return fi local _openssl_syntax="no" local _gnutls_syntax="no" local _backend_supported="yes" if curl -V | grep -q ' OpenSSL/'; then _openssl_syntax="yes" elif curl -V | grep -iq ' LibreSSL/'; then _openssl_syntax="yes" elif curl -V | grep -iq ' BoringSSL/'; then _openssl_syntax="yes" elif curl -V | grep -iq ' GnuTLS/'; then _gnutls_syntax="yes" else _backend_supported="no" fi local _args_supported="no" if [ "$_backend_supported" = "yes" ]; then # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. if check_help_for "notspecified" "curl" "--tlsv1.2" "--ciphers" "--proto"; then _args_supported="yes" fi fi local _cs="" if [ "$_args_supported" = "yes" ]; then if [ "$_openssl_syntax" = "yes" ]; then _cs=$(get_strong_ciphersuites_for "openssl") elif [ "$_gnutls_syntax" = "yes" ]; then _cs=$(get_strong_ciphersuites_for "gnutls") fi fi RETVAL="$_cs" } # Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites # if support by local tools is detected. Detection currently supports these wget backends: # GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. get_ciphersuites_for_wget() { if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then # user specified custom cipher suites, assume they know what they're doing RETVAL="$RUSTUP_TLS_CIPHERSUITES" return fi local _cs="" if wget -V | grep -q '\-DHAVE_LIBSSL'; then # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then _cs=$(get_strong_ciphersuites_for "openssl") fi elif wget -V | grep -q '\-DHAVE_LIBGNUTLS'; then # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then _cs=$(get_strong_ciphersuites_for "gnutls") fi fi RETVAL="$_cs" } # Return strong TLS 1.2-1.3 cipher suites in OpenSSL or GnuTLS syntax. TLS 1.2 # excludes non-ECDHE and non-AEAD cipher suites. DHE is excluded due to bad # DH params often found on servers (see RFC 7919). Sequence matches or is # similar to Firefox 68 ESR with weak cipher suites disabled via about:config. # $1 must be openssl or gnutls. get_strong_ciphersuites_for() { if [ "$1" = "openssl" ]; then # OpenSSL is forgiving of unknown values, no problems with TLS 1.3 values on versions that don't support it yet. echo "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384" elif [ "$1" = "gnutls" ]; then # GnuTLS isn't forgiving of unknown values, so this may require a GnuTLS version that supports TLS 1.3 even if wget doesn't. # Begin with SECURE128 (and higher) then remove/add to build cipher suites. Produces same 9 cipher suites as OpenSSL but in slightly different order. echo "SECURE128:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS-ALL:-CIPHER-ALL:-MAC-ALL:-KX-ALL:+AEAD:+ECDHE-ECDSA:+ECDHE-RSA:+AES-128-GCM:+CHACHA20-POLY1305:+AES-256-GCM" fi } main "$@" || exit 1 </code></WRAP> rust.txt 最終更新: 2024/04/09 14:33by ともやん