Skip to content

spirv-std incompatible with shipped glam version #602

@MasterOktagon

Description

@MasterOktagon

I have added the spirv-builder crate to my project, like described in the book. Then I created a workspace subcrate and added the spriv-std as a dependency. Due to limitations I need to work with the 2024 edition of rust, so I chose to use the 0.10.0-alpha.1 version of both. When compiling the minimal shader example from the examples folder I got following errors from the Spirv builder (from multiple source locations):

warning: vulkanotest2@0.1.0: error[E0432]: unresolved import `glam::UVec2`
warning: vulkanotest2@0.1.0:   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spirv-std-0.10.0-alpha.1/src/arch.rs:11:5
warning: vulkanotest2@0.1.0:    |
warning: vulkanotest2@0.1.0: 11 | use glam::UVec2;
warning: vulkanotest2@0.1.0:    |     ^^^^^^^^^^^ no `UVec2` in the root
warning: vulkanotest2@0.1.0:    |
warning: vulkanotest2@0.1.0: help: a similar name exists in the module
warning: vulkanotest2@0.1.0:    |
warning: vulkanotest2@0.1.0: 11 - use glam::UVec2;
warning: vulkanotest2@0.1.0: 11 + use glam::Vec2;
warning: vulkanotest2@0.1.0:    |
warning: vulkanotest2@0.1.0: 

my shader Cargo.toml has following dependencies:

[dependencies]
bytemuck = { version = "1.25.0", features = ["derive"] }
spirv-std = { version = "0.10.0-alpha.1", features = ["bytemuck"] }

Is this a known error from the alpha version or just me missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions