| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| rust [2025/06/13 05:30] – [マイコン (microcomputer)] ともやん | rust [2025/10/30 09:30] (現在) – [rust-analyzer] ともやん |
|---|
| |
| ===== レシピ ===== | ===== レシピ ===== |
| | |
| | ==== rust-analyzer を JupyterLabで使うための設定 ==== |
| | <WRAP color_term> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">rustup</font> component add rust-analyzer |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | <b>info: </b>downloading component 'rust-analyzer' |
| | <b>info: </b>installing component 'rust-analyzer' |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">mamba</font> a<font color="#999999">ctivate jupyterlab</font> |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">which</font> rust-analyzer |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | ~/.local/bin/rust-analyzer |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">cargo</font> install evcxr_jupyter |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">evcxr_jupyter</font> <font color="#A347BA">--install</font> |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/kernel.json |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/logo-32x32.png |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/logo-64x64.png |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/logo-LICENSE.md |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/kernel.js |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/lint.js |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/lint.css |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/lint-LICENSE |
| | Writing /home/tomoyan/.local/share/jupyter/kernels/rust/version.txt |
| | Installation complete |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">jupyter</font> <font color="#A347BA">--paths</font> |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | config: |
| | /home/tomoyan/miniforge3/envs/jupyterlab/etc/jupyter |
| | /home/tomoyan/.jupyter |
| | /home/tomoyan/.local/etc/jupyter |
| | /usr/local/etc/jupyter |
| | /etc/jupyter |
| | data: |
| | /home/tomoyan/miniforge3/envs/jupyterlab/share/jupyter |
| | /home/tomoyan/.local/share/jupyter |
| | /usr/local/share/jupyter |
| | /usr/share/jupyter |
| | runtime: |
| | /home/tomoyan/.local/share/jupyter/runtime |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">mkdir</font> <font color="#A347BA">-p</font> <u style="text-decoration-style:solid">~/.jupyter/jupyter_server_config.d/</u> |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | (jupyterlab) <font color="#0087FF"><b>$</b></font> <font color="#26A269">nano</font> ~/.jupyter/jupyter_server_config.d/rust-lsp.json |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre class=Bat> |
| | <font color="#839496"> 1</font> <font color="#F8F8F2">{</font> |
| | <font color="#839496"> 2</font> <font color="#F8F8F2"> </font><font color="#FD971F">"LanguageServerManager"</font><font color="#F8F8F2">: {</font> |
| | <font color="#839496"> 3</font> <font color="#F8F8F2"> </font><font color="#FD971F">"language_servers"</font><font color="#F8F8F2">: {</font> |
| | <font color="#839496"> 4</font> <font color="#F8F8F2"> </font><font color="#FD971F">"rust-analyzer"</font><font color="#F8F8F2">: {</font> |
| | <font color="#839496"> 5</font> <font color="#F8F8F2"> </font><font color="#FD971F">"version"</font><font color="#F8F8F2">: </font><font color="#BE84FF">2</font><font color="#F8F8F2">,</font> |
| | <font color="#839496"> 6</font> <font color="#F8F8F2"> </font><font color="#FD971F">"argv"</font><font color="#F8F8F2">: [</font><font color="#E6DB74">"/home/tomoyan/.local/bin/rust-analyzer"</font><font color="#F8F8F2">, </font><font color="#E6DB74">"--stdio"</font><font color="#F8F8F2">],</font> |
| | <font color="#839496"> 7</font> <font color="#F8F8F2"> </font><font color="#FD971F">"languages"</font><font color="#F8F8F2">: [</font><font color="#E6DB74">"rust"</font><font color="#F8F8F2">],</font> |
| | <font color="#839496"> 8</font> <font color="#F8F8F2"> </font><font color="#FD971F">"mime_types"</font><font color="#F8F8F2">: [</font><font color="#E6DB74">"text/x-rust"</font><font color="#F8F8F2">],</font> |
| | <font color="#839496"> 9</font> <font color="#F8F8F2"> </font><font color="#FD971F">"display_name"</font><font color="#F8F8F2">: </font><font color="#E6DB74">"Rust Analyzer"</font> |
| | <font color="#839496"> 10</font> <font color="#F8F8F2"> }</font> |
| | <font color="#839496"> 11</font> <font color="#F8F8F2"> }</font> |
| | <font color="#839496"> 12</font> <font color="#F8F8F2"> }</font> |
| | <font color="#839496"> 13</font> <font color="#F8F8F2">}</font> |
| | </pre></html></WRAP> |
| | </WRAP> |
| |
| ==== sccache - Shared Compilation Cache ==== | ==== sccache - Shared Compilation Cache ==== |
| | [[https://docs.rs/axum/|axum - Rust]] | Tokio エコシステムのモジュラー Web フレームワーク | | | [[https://docs.rs/axum/|axum - Rust]] | Tokio エコシステムのモジュラー Web フレームワーク | |
| | [[https://bevyengine.org/|Bevy Engine]] | WASM にコンパイルされるデータ駆動型ゲーム エンジン | | | [[https://bevyengine.org/|Bevy Engine]] | WASM にコンパイルされるデータ駆動型ゲーム エンジン | |
| | [[https://loco.rs/|Loco | Loco]] | バッテリー付属の Axum に基づく Web フレームワーク | | | [[https://loco.rs/|Loco | Loco]] | バッテリー付属の Axum に基づく Web フレームワーク、Rails-likeフルスタック| |
| | [[https://docs.rs/poem/|poem - Rust]] | フル機能を備えた使いやすい Web フレームワーク | | | [[https://docs.rs/poem/|poem - Rust]] | フル機能を備えた使いやすい Web フレームワーク | |
| | [[https://docs.rs/poise/|poise - Rust]] | 優れたスラッシュコマンドサポートを備えた Discord Bot フレームワーク | | | [[https://docs.rs/poise/|poise - Rust]] | 優れたスラッシュコマンドサポートを備えた Discord Bot フレームワーク | |