1

I have recently been working on a game engine in rust and for rendering I have been planning on using the wgpu crate. When I add this to my dependancies wgpu-hal fails to build with 448 errors. my cargo.toml for this crate looks like this

[package]
name = "ferrogame"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4.17"
fern = {version = "0.6.1", features = ["colored"]}
chrono = "0.4.22"
winit = "0.27.2"
rapier3d = "0.15.0"
rapier2d = "0.15.0"
wgpu = "0.14.0"
[lib]
crate-type = ["rlib"]

This is especially strange because I made a new crate with only wgpu as a dependency and it compiled fine that time. I have tried updating rust and running cargo update but nothing has worked. How can I fix this?

  • 2
    Does this answer your question? https://stackoverflow.com/questions/73967574/dependency-fails-to-compile-in-workspace-but-not-in-package – kmdreko Oct 08 '22 at 20:06
  • If not, please include the errors that you are getting. – kmdreko Oct 08 '22 at 20:28

1 Answers1

0

This issue is due to a version conflict.

Rapier uses bevy at version 0.8, and bevy version 0.8 depends on wgpu at version 0.13

flyingfishcattle
  • 1,817
  • 3
  • 14
  • 25
Jinlei Li
  • 240
  • 6