我想使用包含vulkano中所有示例的a new crate。我将文件夹examples
复制出来并将Cargo.toml更改为
[package]
name = "examples"
version = "0.1.0"
build = "build.rs"
[dependencies]
vulkano = "0.1.0"
vulkano-win = "0.1.0"
cgmath = "0.7.0"
image = "0.6.1"
winit = "0.5.1"
[build-dependencies]
vk-sys = "0.1.1"
vulkano-shaders = "0.1.0"
当我尝试构建时,我得到:
error: the trait bound `(f32, f32, f32): vulkano::pipeline::vertex::VertexMember` is not satisfied [E0277]
) { T :: format ( ) } let dummy = 0usize as * const $ out ; f (
^
note: in this expansion of impl_vertex! (defined in <vulkano macros>)
help: run `rustc --explain E0277` to see a detailed explanation
note: required by `<Vertex as vulkano::pipeline::vertex::Vertex>::member::f`
错误位于here,特征为implemented here。
为什么会出现此错误?为什么Rust告诉我特质VertexMember
不满意?
答案 0 :(得分:0)
问题是货物似乎与crates.io有不匹配的版本。将每个依赖关系指向.git
都有效。
[package]
name = "examples"
version = "0.1.0"
build = "build.rs"
[dependencies]
vulkano = { git = "https://github.com/tomaka/vulkano" }
vulkano-win = { git = "https://github.com/tomaka/vulkano" }
cgmath = "0.7.0"
image = "0.6.1"
winit = "0.5.1"
[build-dependencies]
vk-sys = { git = "https://github.com/tomaka/vulkano" }
vulkano-shaders = { git = "https://github.com/tomaka/vulkano" }