このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
50_dialy:2025:03:14 [2025/03/15 03:28] – 作成 matsui | 50_dialy:2025:03:14 [2025/03/15 11:39] (現在) – matsui | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== 2025.03.14 Zed Editor ====== | + | ====== 2025.03.14 Zed Editor |
Zed EditorをWindows用にビルド | Zed EditorをWindows用にビルド | ||
行 5: | 行 5: | ||
===== 1.Rustインストール ===== | ===== 1.Rustインストール ===== | ||
+ | |||
+ | ダウンロード、インストールする場合: | ||
< | < | ||
行 20: | 行 22: | ||
</ | </ | ||
+ | |||
+ | ==== C++ ツールセット追加 ==== | ||
+ | |||
+ | Visual Studio Installer から追加 | ||
+ | |||
+ | - Win + S を押して「Visual Studio Installer」と入力し、開く。 | ||
+ | * 「Visual Studio Build Tools」を選択 | ||
+ | - 「変更」ボタンをクリック。 | ||
+ | * 「C++ によるデスクトップ開発」ワークロードを追加 | ||
+ | - C++ コンパイラとビルドツール を含むワークロードをチェックする。 | ||
+ | * 「変更」ボタンを押してインストールを開始 | ||
+ | - 「変更」ボタンを押してインストールを開始 | ||
+ | * インストールが完了したら、PCを再起動する。 | ||
+ | |||
+ | ==== MSVC Spectre-mitigated Librariesも必要 ==== | ||
+ | |||
+ | - Visual Studio Installer で Build Tools for Visual Studio 2022 を選択。 | ||
+ | - 個別のコンポーネント タブを開く。 | ||
+ | - 「MSVC v143 Spectre-mitigated Libraries (x86/ | ||
+ | - 変更を適用 をクリックし、インストールを完了。 | ||
+ | |||
+ | ==== cmakeも必要 ==== | ||
+ | |||
+ | < | ||
+ | winget install Kitware.CMake | ||
+ | </ | ||
===== 3.wasmツールチェインインストール ===== | ===== 3.wasmツールチェインインストール ===== | ||
行 34: | 行 62: | ||
git clone https:// | git clone https:// | ||
</ | </ | ||
+ | |||
+ | ==== rust-toolchain.toml修正 ==== | ||
+ | |||
+ | < | ||
+ | targets = [ | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | |||
+ | ↓ | ||
+ | |||
+ | targets = [ " | ||
+ | </ | ||
+ | |||
+ | ===== 5.コンパイル ===== | ||
+ | |||
+ | < | ||
+ | cd zed | ||
+ | rustup override set stable-x86_64-pc-windows-msvc | ||
+ | cargo build --release | ||
+ | </ | ||
+ | |||
+ | ===== 6.起動 ===== | ||
+ | |||
+ | |||
+ | コンパイル完了後、下記にzed.exeができている。 | ||
+ | |||
+ | target\release\zed.exe | ||
+ | |||
+ | |||
+ | ===== エラー集 ===== | ||
+ | |||
+ | |||
+ | ==== cmakeがない ==== | ||
+ | |||
+ | < | ||
+ | error: failed to run custom build command for `aws-lc-sys v0.27.0` | ||
+ | |||
+ | Caused by: | ||
+ | process didn't exit successfully: | ||
+ | --- stdout | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | cargo: | ||
+ | default_for Target: ' | ||
+ | cargo: | ||
+ | cargo: | ||
+ | |||
+ | --- stderr | ||
+ | Missing dependency: cmake | ||
+ | |||
+ | thread ' | ||
+ | called `Result:: | ||
+ | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace | ||
+ | warning: build failed, waiting for other jobs to finish... | ||
+ | </ | ||
+ | |||
+ | === 対応方法 === | ||
+ | [[# | ||
+ | |||
+ | |||
+ | ==== link.exeがない ==== | ||
+ | |||
+ | < | ||
+ | error: linker link.exe not found | ||
+ | | | ||
+ | = note: program not found | ||
+ | |||
+ | note: the msvc targets depend on the msvc linker but link.exe was not found | ||
+ | |||
+ | note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option. | ||
+ | |||
+ | note: VS Code is a different product, and is not sufficient. | ||
+ | |||
+ | | ||
+ | error: could not compile windows_x86_64_msvc (build script) due to 1 previous error | ||
+ | warning: build failed, waiting for other jobs to finish... | ||
+ | error: could not compile typeid (build script) due to 1 previous error | ||
+ | error: could not compile serde (build script) due to 1 previous error | ||
+ | error: could not compile proc-macro2 (build script) due to 1 previous error | ||
+ | </ | ||
+ | |||
+ | === 対応方法 === | ||
+ | |||
+ | [[#C++ ツールセット追加]] | ||
+ | |||
+ | ==== msvc_spectre_libsがない ==== | ||
+ | |||
+ | < | ||
+ | | ||
+ | warning: msvc_spectre_libs@0.1.2: | ||
+ | error: failed to run custom build command for msvc_spectre_libs v0.1.2 | ||
+ | |||
+ | Caused by: | ||
+ | process didn't exit successfully: | ||
+ | --- stdout | ||
+ | cargo: | ||
+ | |||
+ | --- stderr | ||
+ | |||
+ | thread ' | ||
+ | No spectre-mitigated libs were found. Please modify the VS Installation to add these. | ||
+ | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace | ||
+ | warning: build failed, waiting for other jobs to finish... | ||
+ | </ | ||
+ | |||
+ | === 対応方法 === | ||
+ | [[#MSVC Spectre-mitigated Librariesも必要]] | ||
+ | |||
+ | ==== Out of memory ==== | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | | ||
+ | rustc-LLVM ERROR: out of memory | ||
+ | Allocation failed | ||
+ | error: could not compile `editor` (lib) | ||
+ | </ | ||
+ | |||
+ | === 対応方法 === | ||
+ | |||
+ | 並列実行の制限 | ||
+ | < | ||
+ | set CARGO_BUILD_JOBS=1 | ||
+ | </ | ||
+ | |||
+ | これで再buildしてみる。 | ||
+ | |||
{{tag> | {{tag> |