両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
rust [2024/05/18 10:40] – [Application Frameworks] ともやん | rust [2024/06/19 07:26] (現在) – [クレート] ともやん |
---|
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>mkdir</b> <b class=HIK>-p</b> rs_projects/hello_world | <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> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>cd</b> rs_projects/hello_world | <b class=GRN>$</b> <b class=HIY>cd</b> rs_projects/hello_world |
</pre></html></WRAP> | |
<WRAP color_result><html><pre> | |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
<b class=GRN>$</b> <b class=HIY>cat</b> << EOF > main.rs | <b class=GRN>$</b> <b class=HIY>cat</b> << EOF > main.rs |
<b class=GRN>fn</b> <b class=HIB>main</b>() { | <b class=GRN>fn</b> <b class=HIB>main</b>() { |
<b class=HIC>// ようこそ、はるおわ〜るどへ!</b> | <b class=HIC>// ようこそ、はるおわ〜るどへ!</b> |
} | } |
EOF | EOF |
</pre></html></WRAP> | |
<WRAP color_result><html><pre> | |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| |
<b>info: </b>cleaning up downloads & tmp directories | <b>info: </b>cleaning up downloads & tmp directories |
| </pre></html></WRAP> |
| </WRAP> |
| |
| ===== Cargo 拡張機能 ===== |
| |
| ==== cargo-cache ==== |
| 公式: [[https://github.com/matthiaskrgr/cargo-cache|matthiaskrgr/cargo-cache: manage cargo cache (${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively]]\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> cache |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| Cargo cache '/home/tomoyan/.cargo': |
| |
| Total: 4.33 GB |
| 55 installed binaries: 598.06 MB |
| Registry: 3.06 GB |
| 2 registry indices: 1.05 GB |
| 2350 crate archives: 327.96 MB |
| 2350 crate source checkouts: 1.68 GB |
| Git db: 674.12 MB |
| 8 bare git repos: 111.93 MB |
| 12 git repo checkouts: 562.19 MB |
| </pre></html></WRAP> |
| </WRAP> |
| |
| === ヘルプ === |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> cache <font color="#A347BA">--help</font> |
| </pre></html></WRAP> |
| <WRAP color_result_hlong><html><pre> |
| <font color="#26A269">cargo-cache</font> 0.8.3 |
| matthiaskrgr |
| Manage cargo cache |
| |
| <font color="#A2734C">USAGE:</font> |
| cargo cache [OPTIONS] [SUBCOMMAND] |
| |
| <font color="#A2734C">OPTIONS:</font> |
| <font color="#26A269">-a</font>, <font color="#26A269">--autoclean</font> Removes crate source checkouts and git repo checkouts |
| <font color="#26A269">-e</font>, <font color="#26A269">--autoclean-expensive</font> As --autoclean, but also recompresses git repositories |
| <font color="#26A269">-f</font>, <font color="#26A269">--fsck</font> Fsck git repositories |
| <font color="#26A269">-g</font>, <font color="#26A269">--gc</font> Recompress git repositories (may take some time) |
| <font color="#26A269">-h</font>, <font color="#26A269">--help</font> Print help information |
| <font color="#26A269">-i</font>, <font color="#26A269">--info</font> Print information cache directories, what they are for and what can |
| be safely deleted |
| <font color="#26A269">-k</font>, <font color="#26A269">--keep-duplicate-crates</font> <font color="#26A269"><N></font> Remove all but N versions of crate in the source archives directory |
| <font color="#26A269">-l</font>, <font color="#26A269">--list-dirs</font> List all found directory paths |
| <font color="#26A269">-n</font>, <font color="#26A269">--dry-run</font> Don't remove anything, just pretend |
| <font color="#26A269">-o</font>, <font color="#26A269">--remove-if-older-than</font> <font color="#26A269"><date></font> Removes items older than specified date: YYYY.MM.DD or HH:MM:SS |
| <font color="#26A269">-r</font>, <font color="#26A269">--remove-dir</font> <font color="#26A269"><dir1,dir2,dir3></font> Remove directories, accepted values: all,git-db,git-repos, |
| registry-sources,registry-crate-cache,registry-index,registry |
| <font color="#26A269">-t</font>, <font color="#26A269">--top-cache-items</font> <font color="#26A269"><N></font> List the top N items taking most space in the cache |
| <font color="#26A269">-V</font>, <font color="#26A269">--version</font> Print version information |
| <font color="#26A269">-y</font>, <font color="#26A269">--remove-if-younger-than</font> <font color="#26A269"><date></font> Removes items younger than the specified date: YYYY.MM.DD or |
| HH:MM:SS |
| |
| <font color="#A2734C">SUBCOMMANDS:</font> |
| <font color="#26A269">clean-unref</font> remove crates that are not referenced in a Cargo.toml from the cache |
| <font color="#26A269">help</font> Print this message or the help of the given subcommand(s) |
| <font color="#26A269">l</font> check local build cache (target) of a rust project |
| <font color="#26A269">local</font> check local build cache (target) of a rust project |
| <font color="#26A269">q</font> run a query |
| <font color="#26A269">query</font> run a query |
| <font color="#26A269">r</font> query each package registry separately |
| <font color="#26A269">registry</font> query each package registry separately |
| <font color="#26A269">sc</font> gather stats on a local sccache cache |
| <font color="#26A269">sccache</font> gather stats on a local sccache cache |
| <font color="#26A269">toolchain</font> print stats on installed toolchains |
| <font color="#26A269">trim</font> trim old items from the cache until maximum cache size limit is reached |
| <font color="#26A269">verify</font> verify crate sources |
| </pre></html></WRAP> |
| </WRAP> |
| |
| === インストール === |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> install cargo-cache |
| </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> cargo-cache v0.8.3 |
| <font color="#26A269"><b> Downloaded</b></font> 1 crate (243.9 KB) in 0.36s |
| <font color="#26A269"><b> Installing</b></font> cargo-cache v0.8.3 |
| <font color="#26A269"><b> Updating</b></font> crates.io index |
| <font color="#26A269"><b> Downloaded</b></font> adler v1.0.2 |
| <font color="#26A269"><b> Downloaded</b></font> bitflags v1.3.2 |
| <font color="#26A269"><b> Downloaded</b></font> autocfg v1.3.0 |
| <font color="#26A269"><b> Downloaded</b></font> camino v1.1.7 |
| <font color="#26A269"><b> Downloaded</b></font> bitflags v2.5.0 |
| <font color="#26A269"><b> Downloaded</b></font> atty v0.2.14 |
| <font color="#26A269"><b> Downloaded</b></font> cfg-if v1.0.0 |
| <font color="#26A269"><b> Downloaded</b></font> cargo-platform v0.1.8 |
| <font color="#26A269"><b> Downloaded</b></font> rustc_tools_util v0.2.1 |
| <font color="#26A269"><b> Downloaded</b></font> tinyvec_macros v0.1.1 |
| <font color="#26A269"><b> Downloaded</b></font> clap_lex v0.2.4 |
| <font color="#26A269"><b> Downloaded</b></font> dirs-next v2.0.0 |
| <font color="#26A269"><b> Downloaded</b></font> cargo_metadata v0.15.4 |
| <font color="#26A269"><b> Downloaded</b></font> filetime v0.2.23 |
| <font color="#26A269"><b> Downloaded</b></font> dirs-sys-next v0.1.2 |
| <font color="#26A269"><b> Downloaded</b></font> itoa v1.0.11 |
| <font color="#26A269"><b> Downloaded</b></font> humansize v1.1.1 |
| <font color="#26A269"><b> Downloaded</b></font> home v0.5.9 |
| <font color="#26A269"><b> Downloaded</b></font> form_urlencoded v1.2.1 |
| <font color="#26A269"><b> Downloaded</b></font> pkg-config v0.3.30 |
| <font color="#26A269"><b> Downloaded</b></font> either v1.12.0 |
| <font color="#26A269"><b> Downloaded</b></font> percent-encoding v2.3.1 |
| <font color="#26A269"><b> Downloaded</b></font> errno v0.3.9 |
| <font color="#26A269"><b> Downloaded</b></font> remove_dir_all v0.7.0 |
| <font color="#26A269"><b> Downloaded</b></font> strsim v0.10.0 |
| <font color="#26A269"><b> Downloaded</b></font> crossbeam-deque v0.8.5 |
| <font color="#26A269"><b> Downloaded</b></font> termcolor v1.4.1 |
| <font color="#26A269"><b> Downloaded</b></font> xattr v1.3.1 |
| <font color="#26A269"><b> Downloaded</b></font> walkdir v2.5.0 |
| <font color="#26A269"><b> Downloaded</b></font> thiserror-impl v1.0.61 |
| <font color="#26A269"><b> Downloaded</b></font> terminal_size v0.2.6 |
| <font color="#26A269"><b> Downloaded</b></font> crc32fast v1.4.2 |
| <font color="#26A269"><b> Downloaded</b></font> io-lifetimes v1.0.11 |
| <font color="#26A269"><b> Downloaded</b></font> same-file v1.0.6 |
| <font color="#26A269"><b> Downloaded</b></font> jobserver v0.1.31 |
| <font color="#26A269"><b> Downloaded</b></font> os_str_bytes v6.6.1 |
| <font color="#26A269"><b> Downloaded</b></font> once_cell v1.19.0 |
| <font color="#26A269"><b> Downloaded</b></font> semver v1.0.23 |
| <font color="#26A269"><b> Downloaded</b></font> crossbeam-epoch v0.9.18 |
| <font color="#26A269"><b> Downloaded</b></font> iana-time-zone v0.1.60 |
| <font color="#26A269"><b> Downloaded</b></font> miniz_oxide v0.7.3 |
| <font color="#26A269"><b> Downloaded</b></font> proc-macro2 v1.0.84 |
| <font color="#26A269"><b> Downloaded</b></font> thiserror v1.0.61 |
| <font color="#26A269"><b> Downloaded</b></font> serde_derive v1.0.203 |
| <font color="#26A269"><b> Downloaded</b></font> ryu v1.0.18 |
| <font color="#26A269"><b> Downloaded</b></font> tinyvec v1.6.0 |
| <font color="#26A269"><b> Downloaded</b></font> unicode-ident v1.0.12 |
| <font color="#26A269"><b> Downloaded</b></font> textwrap v0.16.1 |
| <font color="#26A269"><b> Downloaded</b></font> crossbeam-utils v0.8.20 |
| <font color="#26A269"><b> Downloaded</b></font> tar v0.4.40 |
| <font color="#26A269"><b> Downloaded</b></font> aho-corasick v1.1.3 |
| <font color="#26A269"><b> Downloaded</b></font> quote v1.0.36 |
| <font color="#26A269"><b> Downloaded</b></font> rayon-core v1.12.1 |
| <font color="#26A269"><b> Downloaded</b></font> num-traits v0.2.19 |
| <font color="#26A269"><b> Downloaded</b></font> unicode-bidi v0.3.15 |
| <font color="#26A269"><b> Downloaded</b></font> log v0.4.21 |
| <font color="#26A269"><b> Downloaded</b></font> cc v1.0.98 |
| <font color="#26A269"><b> Downloaded</b></font> flate2 v1.0.30 |
| <font color="#26A269"><b> Downloaded</b></font> indexmap v1.9.3 |
| <font color="#26A269"><b> Downloaded</b></font> serde v1.0.203 |
| <font color="#26A269"><b> Downloaded</b></font> url v2.5.0 |
| <font color="#26A269"><b> Downloaded</b></font> memchr v2.7.2 |
| <font color="#26A269"><b> Downloaded</b></font> hashbrown v0.12.3 |
| <font color="#26A269"><b> Downloaded</b></font> unicode-normalization v0.1.23 |
| <font color="#26A269"><b> Downloaded</b></font> serde_json v1.0.117 |
| <font color="#26A269"><b> Downloaded</b></font> rayon v1.10.0 |
| <font color="#26A269"><b> Downloaded</b></font> git2 v0.14.4 |
| <font color="#26A269"><b> Downloaded</b></font> clap v3.2.25 |
| <font color="#26A269"><b> Downloaded</b></font> vcpkg v0.2.15 |
| <font color="#26A269"><b> Downloaded</b></font> syn v2.0.66 |
| <font color="#26A269"><b> Downloaded</b></font> idna v0.5.0 |
| <font color="#26A269"><b> Downloaded</b></font> rustix v0.38.34 |
| <font color="#26A269"><b> Downloaded</b></font> rustix v0.37.27 |
| <font color="#26A269"><b> Downloaded</b></font> regex-automata v0.4.6 |
| <font color="#26A269"><b> Downloaded</b></font> libz-sys v1.1.18 |
| <font color="#26A269"><b> Downloaded</b></font> linux-raw-sys v0.3.8 |
| <font color="#26A269"><b> Downloaded</b></font> libc v0.2.155 |
| <font color="#26A269"><b> Downloaded</b></font> regex-syntax v0.8.3 |
| <font color="#26A269"><b> Downloaded</b></font> regex v1.10.4 |
| <font color="#26A269"><b> Downloaded</b></font> libgit2-sys v0.13.5+1.4.5 |
| <font color="#26A269"><b> Downloaded</b></font> linux-raw-sys v0.4.14 |
| <font color="#26A269"><b> Downloaded</b></font> chrono v0.4.38 |
| <font color="#26A269"><b> Downloaded</b></font> 82 crates (12.1 MB) in 1.78s (largest was `linux-raw-sys` at 1.8 MB) |
| <font color="#26A269"><b> Compiling</b></font> libc v0.2.155 |
| <font color="#26A269"><b> Compiling</b></font> proc-macro2 v1.0.84 |
| <font color="#26A269"><b> Compiling</b></font> unicode-ident v1.0.12 |
| <font color="#26A269"><b> Compiling</b></font> quote v1.0.36 |
| <font color="#26A269"><b> Compiling</b></font> syn v2.0.66 |
| <font color="#26A269"><b> Compiling</b></font> jobserver v0.1.31 |
| <font color="#26A269"><b> Compiling</b></font> once_cell v1.19.0 |
| <font color="#26A269"><b> Compiling</b></font> autocfg v1.3.0 |
| <font color="#26A269"><b> Compiling</b></font> cc v1.0.98 |
| <font color="#26A269"><b> Compiling</b></font> serde v1.0.203 |
| <font color="#26A269"><b> Compiling</b></font> pkg-config v0.3.30 |
| <font color="#26A269"><b> Compiling</b></font> serde_derive v1.0.203 |
| <font color="#26A269"><b> Compiling</b></font> crossbeam-utils v0.8.20 |
| <font color="#26A269"><b> Compiling</b></font> io-lifetimes v1.0.11 |
| <font color="#26A269"><b> Compiling</b></font> vcpkg v0.2.15 |
| <font color="#26A269"><b> Compiling</b></font> libz-sys v1.1.18 |
| <font color="#26A269"><b> Compiling</b></font> cfg-if v1.0.0 |
| <font color="#26A269"><b> Compiling</b></font> bitflags v1.3.2 |
| <font color="#26A269"><b> Compiling</b></font> tinyvec_macros v0.1.1 |
| <font color="#26A269"><b> Compiling</b></font> rustix v0.37.27 |
| <font color="#26A269"><b> Compiling</b></font> tinyvec v1.6.0 |
| <font color="#26A269"><b> Compiling</b></font> linux-raw-sys v0.3.8 |
| <font color="#26A269"><b> Compiling</b></font> rustix v0.38.34 |
| <font color="#26A269"><b> Compiling</b></font> crossbeam-epoch v0.9.18 |
| <font color="#26A269"><b> Compiling</b></font> unicode-normalization v0.1.23 |
| <font color="#26A269"><b> Compiling</b></font> libgit2-sys v0.13.5+1.4.5 |
| <font color="#26A269"><b> Compiling</b></font> num-traits v0.2.19 |
| <font color="#26A269"><b> Compiling</b></font> indexmap v1.9.3 |
| <font color="#26A269"><b> Compiling</b></font> thiserror v1.0.61 |
| <font color="#26A269"><b> Compiling</b></font> camino v1.1.7 |
| <font color="#26A269"><b> Compiling</b></font> semver v1.0.23 |
| <font color="#26A269"><b> Compiling</b></font> percent-encoding v2.3.1 |
| <font color="#26A269"><b> Compiling</b></font> serde_json v1.0.117 |
| <font color="#26A269"><b> Compiling</b></font> linux-raw-sys v0.4.14 |
| <font color="#26A269"><b> Compiling</b></font> unicode-bidi v0.3.15 |
| <font color="#26A269"><b> Compiling</b></font> memchr v2.7.2 |
| <font color="#26A269"><b> Compiling</b></font> rayon-core v1.12.1 |
| <font color="#26A269"><b> Compiling</b></font> bitflags v2.5.0 |
| <font color="#26A269"><b> Compiling</b></font> aho-corasick v1.1.3 |
| <font color="#26A269"><b> Compiling</b></font> idna v0.5.0 |
| <font color="#26A269"><b> Compiling</b></font> form_urlencoded v1.2.1 |
| <font color="#26A269"><b> Compiling</b></font> terminal_size v0.2.6 |
| <font color="#26A269"><b> Compiling</b></font> crossbeam-deque v0.8.5 |
| <font color="#26A269"><b> Compiling</b></font> thiserror-impl v1.0.61 |
| <font color="#26A269"><b> Compiling</b></font> rustc_tools_util v0.2.1 |
| <font color="#26A269"><b> Compiling</b></font> ryu v1.0.18 |
| <font color="#26A269"><b> Compiling</b></font> hashbrown v0.12.3 |
| <font color="#26A269"><b> Compiling</b></font> itoa v1.0.11 |
| <font color="#26A269"><b> Compiling</b></font> regex-syntax v0.8.3 |
| <font color="#26A269"><b> Compiling</b></font> os_str_bytes v6.6.1 |
| <font color="#26A269"><b> Compiling</b></font> adler v1.0.2 |
| <font color="#26A269"><b> Compiling</b></font> miniz_oxide v0.7.3 |
| <font color="#26A269"><b> Compiling</b></font> clap_lex v0.2.4 |
| <font color="#26A269"><b> Compiling</b></font> regex-automata v0.4.6 |
| <font color="#26A269"><b> Compiling</b></font> cargo-cache v0.8.3 |
| <font color="#26A269"><b> Compiling</b></font> textwrap v0.16.1 |
| <font color="#26A269"><b> Compiling</b></font> url v2.5.0 |
| <font color="#26A269"><b> Compiling</b></font> xattr v1.3.1 |
| <font color="#26A269"><b> Compiling</b></font> cargo-platform v0.1.8 |
| <font color="#26A269"><b> Compiling</b></font> crc32fast v1.4.2 |
| <font color="#26A269"><b> Compiling</b></font> filetime v0.2.23 |
| <font color="#26A269"><b> Compiling</b></font> dirs-sys-next v0.1.2 |
| <font color="#26A269"><b> Compiling</b></font> atty v0.2.14 |
| <font color="#26A269"><b> Compiling</b></font> same-file v1.0.6 |
| <font color="#26A269"><b> Compiling</b></font> termcolor v1.4.1 |
| <font color="#26A269"><b> Compiling</b></font> iana-time-zone v0.1.60 |
| <font color="#26A269"><b> Compiling</b></font> log v0.4.21 |
| <font color="#26A269"><b> Compiling</b></font> either v1.12.0 |
| <font color="#26A269"><b> Compiling</b></font> strsim v0.10.0 |
| <font color="#26A269"><b> Compiling</b></font> clap v3.2.25 |
| <font color="#26A269"><b> Compiling</b></font> rayon v1.10.0 |
| <font color="#26A269"><b> Compiling</b></font> chrono v0.4.38 |
| <font color="#26A269"><b> Compiling</b></font> walkdir v2.5.0 |
| <font color="#26A269"><b> Compiling</b></font> dirs-next v2.0.0 |
| <font color="#26A269"><b> Compiling</b></font> tar v0.4.40 |
| <font color="#26A269"><b> Compiling</b></font> flate2 v1.0.30 |
| <font color="#26A269"><b> Compiling</b></font> cargo_metadata v0.15.4 |
| <font color="#26A269"><b> Compiling</b></font> regex v1.10.4 |
| <font color="#26A269"><b> Compiling</b></font> remove_dir_all v0.7.0 |
| <font color="#26A269"><b> Compiling</b></font> home v0.5.9 |
| <font color="#26A269"><b> Compiling</b></font> humansize v1.1.1 |
| <font color="#26A269"><b> Compiling</b></font> git2 v0.14.4 |
| <font color="#26A269"><b> Finished</b></font> `release` profile [optimized] target(s) in 8m 28s |
| <font color="#26A269"><b> Installing</b></font> /home/tomoyan/.cargo/bin/cargo-cache |
| <font color="#26A269"><b> Installed</b></font> package `cargo-cache v0.8.3` (executable `cargo-cache`) |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
info: rustup is uninstalled | info: rustup is uninstalled |
</pre></html></WRAP> | </pre></html></WRAP> |
| </WRAP> |
| |
| ===== クレート ===== |
| <html><style> |
| .wrap_crates_list div.wrap_color_term { |
| margin: 0; |
| padding: .2em; |
| } |
| .wrap_crates_list .wrap_color_command pre { |
| min-width: unset; |
| } |
| .wrap_crates_list .col0, |
| .wrap_crates_list .col1 pre { |
| white-space: nowrap; |
| } |
| </style></html> |
| <WRAP mintbl_11 crates_list> |
| ^ ドキュメント\\ リポジトリ ^ クレート追加\\ サンプル (<wrap em>examples</wrap>) ^ 説明 ^ |
| | [[https://docs.rs/clap|clap - Rust]]\\ [[git>clap-rs/clap|clap]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add clap <font color="#A347BA">-F</font><font color="#999999"> derive</font></pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/clap-rs/clap.git</pre></html></WRAP></WRAP> | Command Line Argument Parser for Rust | |
| | [[https://docs.rs/walkdir|walkdir - Rust]]\\ [[git>BurntSushi/walkdir|walkdir]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add walkdir</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/BurntSushi/walkdir.git</pre></html></WRAP></WRAP> | Rust library for walking directories recursively. | |
| | [[https://docs.rs/dotenv|dotenv - Rust]]\\ [[git>dotenv-rs/dotenv|rust-dotenv]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add dotenv</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/dotenv-rs/dotenv.git</pre></html></WRAP></WRAP> | It loads environment variables from a .env file. | |
| | [[https://docs.rs/colored|colored - Rust]]\\ [[git>mackwic/colored|Colored]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add colored</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/colored-rs/colored.git</pre></html></WRAP></WRAP> | colored: (Rust) Coloring terminal so simple you already know how to do it !. | |
| | [[https://docs.rs/diesel|diesel - Rust]]\\ [[git>diesel-rs/diesel|diesel ORM]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add diesel</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/diesel-rs/diesel.git</pre></html></WRAP></WRAP> | diesel: A safe, extensible ORM and Query Builder for Rust. | |
| | [[https://docs.rs/env_logger|env_logger - Rust]]\\ [[git>rust-cli/env_logger|env_logger]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add env_logger</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/rust-cli/env_logger.git</pre></html></WRAP></WRAP> | rust-cli/env_logger: A logging implementation for `log` which is configured via an environment variable. | |
| | [[https://docs.rs/exif|exif - Rust]]\\ [[glb>dcuddeback/exif|exif]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add exif</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://gitlab.com/dcuddeback/exif.git</pre></html></WRAP></WRAP> | Rust wrapper for libexif. | |
| | [[https://docs.rs/numfmt|numfmt - Rust]]\\ [[git>kurtlawrence/numfmt|numfmt]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add numfmt</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/kurtlawrence/numfmt.git</pre></html></WRAP></WRAP> | kurtlawrence/numfmt: Fast and friendly Rust number formatting | |
| | [[https://docs.rs/pathdiff|pathdiff - Rust]]\\ [[git>Manishearth/pathdiff|pathdiff]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add pathdiff</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/Manishearth/pathdiff.git</pre></html></WRAP></WRAP> | Manishearth/pathdiff | |
| | [[https://docs.rs/spinners|spinners - Rust]]\\ [[git>fgribreau/spinners|spinners]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add spinners</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/FGRibreau/spinners.git</pre></html></WRAP></WRAP> | FGRibreau/spinners: 🛎 60+ Elegant terminal spinners for Rust | |
| | [[https://docs.rs/substring|substring - Rust]]\\ [[git>Anders429/substring|substring]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add substring</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/Anders429/substring.git</pre></html></WRAP></WRAP> | Anders429/substring: A substring method for string types. | |
| | [[https://docs.rs/termion|termion - Rust]]\\ [[glbc>redox-os.org/redox-os/termion|termion]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add termion</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://gitlab.redox-os.org/redox-os/termion.git</pre></html></WRAP></WRAP> | A bindless library for controlling terminals/TTY. | |
| | [[https://docs.rs/axum|axum - Rust]]\\ [[git>tokio-rs/axum|axum]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add axum</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/tokio-rs/axum.git</pre></html></WRAP></WRAP> | tokio-rs/axum: Ergonomic and modular web framework built with Tokio, Tower, and Hyper | |
| | [[https://docs.rs/tera|tera - Rust]]\\ [[git>Keats/tera|tera]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add tera</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/Keats/tera.git</pre></html></WRAP></WRAP> | Keats/tera: A template engine for Rust based on Jinja2/Django | |
| | [[https://docs.rs/yew|yew - Rust]]\\ [[git>yewstack/yew|yew]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add yew</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/yewstack/yew.git</pre></html></WRAP></WRAP> | yewstack/yew: Rust / Wasm framework for creating reliable and efficient web applications. | |
| | [[https://docs.rs/lazy_static|lazy_static - Rust]]\\ [[git>rust-lang-nursery/lazy-static.rs|lazy_static]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add lazy_static</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/rust-lang-nursery/lazy-static.rs.git</pre></html></WRAP></WRAP> | rust-lang-nursery/lazy-static.rs: A small macro for defining lazy evaluated static variables in Rust. | |
| | [[https://docs.rs/tokio|tokio - Rust]]\\ [[git>tokio-rs/tokio|tokio]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add tokio</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/ratatui-org/ratatui.git</pre></html></WRAP></WRAP> | tokio-rs/tokio: A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ... | |
| | [[https://docs.rs/ratatui|ratatui - Rust]]\\ [[git>ratatui-org/ratatui|ratatui]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add ratatui</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/ratatui-org/ratatui.git</pre></html></WRAP></WRAP> | ratatui-org/ratatui: Rust library that's all about cooking up terminal user interfaces (TUIs) 👨🍳🐀 | |
| | [[https://docs.rs/crossterm|crossterm - Rust]]\\ [[git>crossterm-rs/crossterm|crossterm]] | <WRAP color_term><WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> add crossterm</pre></html></WRAP> <WRAP color_command><html><pre><font color="#0087FF"><b>$</b></font> <font color="#26A269">git</font> clone <font color="#A347BA">--depth</font> 1 https://github.com/crossterm-rs/crossterm.git</pre></html></WRAP></WRAP> | crossterm-rs/crossterm: Cross platform terminal library rust | |
</WRAP> | </WRAP> |
| |
| [[https://docs.rs/warp/|warp - Rust]] | Web フレームワーク | | | [[https://docs.rs/warp/|warp - Rust]] | Web フレームワーク | |
</WRAP> | </WRAP> |
| [[git>tokio-rs/axum/blob/main/ECOSYSTEM.md|axum/ECOSYSTEM.md at main · tokio-rs/axum]]\\ |
| |
Rust / Wasm クライアント Web アプリ フレームワーク\\ | === テンプレートエンジン === |
| [[https://keats.github.io/tera/|Tera - Inspired by Jinja2 and Django templates]]\\ |
| [[https://docs.rs/handlebars/|handlebars-rust]]\\ |
| [[https://docs.rs/minijinja/|MiniJinja]]\\ |
| |
| === Wasm Web アプリケーション フレームワーク === |
| Rust / Wasm クライアント Web アプリケーション フレームワーク\\ |
[[https://yew.rs/|Yew]]\\ | [[https://yew.rs/|Yew]]\\ |
| |
非同期ランタイム\\ | === 非同期ランタイム === |
[[https://tokio.rs/|Tokio - An asynchronous Rust runtime]]\\ | [[https://tokio.rs/|Tokio - An asynchronous Rust runtime]]\\ |
Rust 用の WebAssembly (WASM) Web アプリケーション バンドラー\\ | Rust 用の WebAssembly (WASM) Web アプリケーション バンドラー\\ |
[[https://trunkrs.dev/|Trunk | Build, bundle & ship your Rust WASM application to the web]]\\ | [[https://trunkrs.dev/|Trunk | Build, bundle & ship your Rust WASM application to the web]]\\ |
| |
| === TUI ライブラリ === |
| ratatui: ターミナル ユーザー インターフェイス (TUI) を作成するための Rust ライブラリ 👨🍳🐀\\ |
| [[https://ratatui.rs/|Ratatui | Ratatui]]\\ |
| [[git>ratatui-org/ratatui|ratatui-org/ratatui: Rust library that's all about cooking up terminal user interfaces (TUIs) 👨🍳🐀]]\\ |
| |
| === GUI ライブラリ === |
Rust 用のエレガントな GUI ライブラリ\\ | Rust 用のエレガントな GUI ライブラリ\\ |
[[https://dioxuslabs.com/|Dioxus | An elegant GUI library for Rust]]\\ | [[https://dioxuslabs.com/|Dioxus | An elegant GUI library for Rust]]\\ |
| |
| [[.rust:axum|Axum]]\\ |
| |
==== ORM - Object Relational Mapper ==== | ==== ORM - Object Relational Mapper ==== |
参考: [[https://www.shuttle.rs/blog/2024/01/16/best-orm-rust|A Guide to Rust ORMs in 2024]] [[gtr>https://www.shuttle.rs/blog/2024/01/16/best-orm-rust|翻訳]]\\ | 参考: [[https://www.shuttle.rs/blog/2024/01/16/best-orm-rust|A Guide to Rust ORMs in 2024]] [[gtr>https://www.shuttle.rs/blog/2024/01/16/best-orm-rust|翻訳]]\\ |
| |
| === SeaORM === |
公式: [[https://www.sea-ql.org/SeaORM/|SeaORM 🐚 An async & dynamic ORM for Rust]]\\ | 公式: [[https://www.sea-ql.org/SeaORM/|SeaORM 🐚 An async & dynamic ORM for Rust]]\\ |
ソースコード: [[git>SeaQL/sea-orm|SeaQL/sea-orm: 🐚 An async & dynamic ORM for Rust]]\\ | ソースコード: [[git>SeaQL/sea-orm|SeaQL/sea-orm: 🐚 An async & dynamic ORM for Rust]]\\ |
| |
| === Diesel === |
公式: [[https://diesel.rs/|Diesel is a Safe, Extensible ORM and Query Builder for Rust]]\\ | 公式: [[https://diesel.rs/|Diesel is a Safe, Extensible ORM and Query Builder for Rust]]\\ |
ソースコード: [[git>diesel-rs/diesel|diesel-rs/diesel: A safe, extensible ORM and Query Builder for Rust]]\\ | ソースコード: [[git>diesel-rs/diesel|diesel-rs/diesel: A safe, extensible ORM and Query Builder for Rust]]\\ |
| |
| [[.rust:diesel|Diesel]]\\ |
| |
==== Web ベースの Rust シミュレーター ==== | ==== Web ベースの Rust シミュレーター ==== |
</pre></html></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |
| ===== 実装方法に迷ったら... ===== |
| [[https://www.oreilly.com/library/view/command-line-rust/9781098109424/|Command-Line Rust [Book]]]\\ |
| [[git>kyclark/command-line-rust|kyclark/command-line-rust: Code for Command-Line Rust (O'Reilly, 2022, ISBN 9781098109417)]]\\ |
| |
| [[https://www.oreilly.com/library/view/programming-rust/9781491927274/|Programming Rust [Book]]]\\ |
| [[git>ProgrammingRust|Programming Rust]]\\ |
| |
| [[https://www.manning.com/books/rust-in-action|Rust in Action]]\\ |
| [[git>rust-in-action/code|rust-in-action/code: Source code for the book Rust in Action]]\\ |
| |
===== トラブルシューティング ===== | ===== トラブルシューティング ===== |
[[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|翻訳]]\\ | [[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]]\\ | [[https://gihyo.jp/article/2023/07/monthly-python-2307|PythonとRustの融合:PyO3/maturinを使ったPythonバインディングの作成入門 | gihyo.jp]]\\ |
| [[https://users.rust-lang.org/t/rust-official-ide/103656|Rust official IDE - community - The Rust Programming Language Forum]]\\ |
| [[https://rapidrehita.health.nz/blog/extending-django-with-rust/|Rapid Rēhita | Extending Django with Rust]]\\ |
| |
==== 付録 ==== | ==== 付録 ==== |