ユーザ用ツール

サイト用ツール


50_dialy:2025:03:14

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
50_dialy:2025:03:14 [2025/03/15 04:43] matsui50_dialy:2025:03:14 [2025/03/15 11:39] (現在) matsui
行 1: 行 1:
-====== 2025.03.14 Zed Editor ======+====== 2025.03.14 Zed Editor Windowsでビルド ======
  
 Zed EditorをWindows用にビルド Zed EditorをWindows用にビルド
行 36: 行 36:
     * インストールが完了したら、PCを再起動する。      * インストールが完了したら、PCを再起動する。 
  
 +==== MSVC Spectre-mitigated Librariesも必要 ====
  
 +  - Visual Studio Installer で Build Tools for Visual Studio 2022 を選択。
 +  - 個別のコンポーネント タブを開く。
 +  - 「MSVC v143 Spectre-mitigated Libraries (x86/x64)」 を検索してチェック。
 +  - 変更を適用 をクリックし、インストールを完了。
  
 ==== cmakeも必要 ==== ==== cmakeも必要 ====
行 56: 行 61:
 <code> <code>
 git clone https://github.com/zed-industries/zed.git git clone https://github.com/zed-industries/zed.git
 +</code>
 +
 +==== rust-toolchain.toml修正 ====
 +
 +<code>
 +targets = [
 +    "x86_64-apple-darwin",
 +    "aarch64-apple-darwin",
 +    "x86_64-unknown-linux-gnu",
 +    "x86_64-pc-windows-msvc",
 +    "wasm32-wasip1", # extensions
 +    "x86_64-unknown-linux-musl", # remote server
 +]
 +
 +
 +
 +targets = [ "stable-x86_64-pc-windows-msvc" ]
 </code> </code>
  
行 63: 行 85:
 cd zed cd zed
 rustup override set stable-x86_64-pc-windows-msvc rustup override set stable-x86_64-pc-windows-msvc
-cargo build --release --target stable-x86_64-pc-windows-msvc+cargo build --release
 </code> </code>
  
 +===== 6.起動 =====
 +
 +
 +コンパイル完了後、下記にzed.exeができている。
 +
 +  target\release\zed.exe
  
  
行 130: 行 158:
  
 [[#C++ ツールセット追加]] [[#C++ ツールセット追加]]
 +
 +==== msvc_spectre_libsがない ====
 +
 +<code>
 + Compiling clap_builder v4.5.32
 +warning: msvc_spectre_libs@0.1.2: No spectre-mitigated libs were found. Please modify the VS Installation to add these.
 +error: failed to run custom build command for msvc_spectre_libs v0.1.2
 +
 +Caused by:
 +  process didn't exit successfully: C:\Users\s-matsui\zed\target\release\build\msvc_spectre_libs-362ba44b58252040\build-script-build (exit code: 101)
 +  --- stdout
 +  cargo:warning=No spectre-mitigated libs were found. Please modify the VS Installation to add these.
 +
 +  --- stderr
 +
 +  thread 'main' panicked at C:\Users\s-matsui\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\msvc_spectre_libs-0.1.2\build.rs:37:13:
 +  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...
 +</code>
 +
 +=== 対応方法 ===
 +[[#MSVC Spectre-mitigated Librariesも必要]]
 +
 +==== Out of memory ====
 +
 +<code>
 +   Compiling assistant_slash_commands v0.1.0 (C:\Users\s-matsui\zed\crates\assistant_slash_commands)
 +   Compiling aws-smithy-xml v0.60.9
 +   Compiling language_model_selector v0.1.0 (C:\Users\s-matsui\zed\crates\language_model_selector)
 +rustc-LLVM ERROR: out of memory
 +Allocation failed
 +error: could not compile `editor` (lib)
 +</code>
 +
 +=== 対応方法 ===
 +
 +並列実行の制限
 +<code>
 +set CARGO_BUILD_JOBS=1
 +</code>
 +
 +これで再buildしてみる。
 +
 +
  
 {{tag>日記 Editor Zed}} {{tag>日記 Editor Zed}}
50_dialy/2025/03/14.1742013832.txt.gz · 最終更新: 2025/03/15 04:43 by matsui