$CARGO_MANIFEST_DIR "leakage" (used at runtime) due to target-specs vendoring.
オープン
まだ誰も着手していません。
bug
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I cant keep rust-gpu updated for my projects since this commit
Example & Steps To Reproduce
I have made a minimal example to demonstrate
nix run github:abel465/rust-gpu-nixos-example/b117267d254310df77e69debde9e510ed193ff56
The shader builds just fine for the above command. it uses this version of rust-gpu
> nix run github:abel465/rust-gpu-nixos-example/6c9e2ca63da09ab1d119a06a596cd41f84255876
cargo:rerun-if-env-changed=RUSTGPU_CODEGEN_ARGS
cargo:rerun-if-env-changed=RUSTGPU_RUSTFLAGS
error: target path "/build/cargo-vendor-dir/spirv-builder-0.9.0/target-specs/spirv-unknown-vulkan1.1.json" is not a valid file
Caused by:
No such file or directory (os error 2)
thread 'main' panicked at runner/src/main.rs:17:42:
called `Result::unwrap()` on an `Err` value: BuildFailed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The above command is the same except it uses the next commit of rust-gpu which seems to hard code CARGO_MANIFEST_DIR into the binary. This is problematic because the build environment is no longer available during runtime with nix
System Info
- Rust: 1.78.0-nightly (3b1717c05 2024-03-10)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、commit 775b5d5 で導入された動作を動作するバージョン 40456ae と比較し、runner/src/main.rs と再現手順に示されている target-specs パスに注目してください。Issue にある 2 つの nix コマンドを実行してください。利用できない build-environment パスに依存せずに vendored shader がビルドできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- build-system, compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100