Rust-GPU / Rust-GPU/rust-gpu

glam dependency is not optional in spirv-std

オープン
#146 コメント 14 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Rust
スター
3.4k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

The readme in spirv-std states:

Optionally, through the use of the "glam" feature, it includes some boilerplate trait implementations to make glam vector types compatible with these APIs.

However, there is no feature flag that actually controls the glam bindings. As such, on a clean dependency with no features specified, spirv-std requires glam as a dependency to build. Also, the workspace level default-features=false does not seem to get used properly, making std included with glam.

I would definitely like to see this optional, and then perhaps introduce an nalgebra helper as well in the future.

--- stderr
      Blocking waiting for file lock on build directory
     Compiling core v0.0.0 (/home/marios/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
     Compiling compiler_builtins v0.1.109
     Compiling serde_json v1.0.132
     Compiling smallvec v1.13.2
     Compiling spirv-tools-sys v0.8.0
     Compiling libm v0.2.11
     Compiling num-traits v0.2.19
     Compiling typenum v1.17.0
     Compiling spirv-tools v0.10.0
     Compiling spirt v0.4.0
     Compiling rustc_codegen_spirv-types v0.9.0 (https://github.com/Rust-GPU/rust-gpu.git#0da80f8a)
     Compiling rustc_codegen_spirv v0.9.0 (https://github.com/Rust-GPU/rust-gpu.git#0da80f8a)
     Compiling rustc-std-workspace-core v1.99.0 (/home/marios/.rustup/toolchains/nightly-2024-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
     Compiling bytemuck v1.19.0
     Compiling spirv-std-types v0.9.0 (https://github.com/Rust-GPU/rust-gpu.git#0da80f8a)
     Compiling bitflags v1.3.2
     Compiling glam v0.24.2
  error[E0463]: can't find crate for `std`
    --> /home/marios/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:23:1
     |
  23 | extern crate std;
     | ^^^^^^^^^^^^^^^^^ can't find crate
     |
     = note: the `spirv-unknown-vulkan1.2` target may not support the standard library
     = help: consider building the standard library from source with `cargo build -Zbuild-std`

  error[E0463]: can't find crate for `std`
    |
    = note: the `spirv-unknown-vulkan1.2` target may not support the standard library
    = note: `std` is required by `glam` because it does not declare `#![no_std]`
    = help: consider building the standard library from source with `cargo build -Zbuild-std`

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

spirv-std README と、その Cargo の依存関係および feature メタデータから始めます。spirv ターゲットに対して feature なしのクリーンビルドを再現し、その後 glam が必須ではなく、std が取り込まれないことを確認します。依存関係の設定と feature なしのビルドは、文書化されたオプション動作を反映する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
build-system
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。