glam dependency is not optional in spirv-std
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.4k
- Forks
- 126
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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`
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem spirv-std README und seinen Cargo-Abhängigkeits- und Feature-Metadaten. Führe einen sauberen Build ohne Features für das spirv-Ziel durch und überprüfe anschließend, dass glam nicht erforderlich ist und std nicht eingebunden wird; die Abhängigkeitskonfiguration und der Build ohne Features sollten das dokumentierte optionale Verhalten widerspiegeln.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- build-system
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100