I got compile errors such as these.
I think the main reason is that nokhwa-core0.1.1 isn't released in crates.io, so we cannot depend on it, which leads to inconsistent wgpu versions.
error[E0308]: arguments to this method are incorrect
--> D:\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\nokhwa-0.10.4\src\camera.rs:415:21
|
415 | self.device.frame_texture(device, queue, label)
| ^^^^^^^^^^^^^ ------ ----- expected `wgpu::Queue`, found `Queue`
| |
| expected `wgpu::Device`, found `Device`
|
= note: `Device` and `wgpu::Device` have similar names, but are actually distinct types
note: `Device` is defined in crate `wgpu`
--> D:\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\wgpu-0.16.0\src\lib.rs:117:1
|
117 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
note: `wgpu::Device` is defined in crate `wgpu`
--> D:\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\wgpu-0.14.2\src\lib.rs:590:1
|
590 | pub struct Device {
| ^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `wgpu` are being used?
= note: `Queue` and `wgpu::Queue` have similar names, but are actually distinct types
note: `Queue` is defined in crate `wgpu`
Here is the result of the cargo tree in my project.
We could observe the different wgpu versions.
I got compile errors such as these. I think the main reason is that
nokhwa-core
0.1.1
isn't released in crates.io, so we cannot depend on it, which leads to inconsistentwgpu
versions.Here is the result of the
cargo tree
in my project. We could observe the differentwgpu
versions.Thanks a lot.