Hands-on Rust: toml formatting / cargo build issue (page 18)

If you copy/paste the second TOML snipped with features, there are two issues:

  1. It’s presented as multi-line, but TOML doesn’t support multi-line inline tables. You could show it as:
[dependencies.bracket-lib]
git = "https://github.com/thebracket/bracket-lib"
default-features = false
features = ["amethyst_engine_vulkan"]
  1. cargo run doesn’t like this:
error: failed to select a version for `bracket-lib`.
versions that meet the requirements `*` are: 0.8.2

the package `testrust` depends on `bracket-lib`, with features: `amethyst_engine_vulkan` but `bracket-lib` does not have these features.

failed to select a version for `bracket-lib` which could resolve this conflict

Hi! Sorry for the delay - I only just saw this one. I think specifying “version = 0.8.2” for bracket-lib should make it run, but there’s a caveat. Amethyst have discontinued development on Amethyst, so the next bracket-lib version will support wgpu instead. When it’s finalized, I’ll be sure to announce it widely.