`cargo build` tries to build dependencies (and dependencies of them, recursively) with ALL features enabled, ALL dependency crates included, even if they are opted-out #14892
gltf crate v1.41 depends on images, images has an optional dependency ravif that is not enabled by gltf, and ravif depends wasm-bindgen-macro, which uses an unstable feature allow_internal_unstable.
However when I was trying to build a crate depending on gltf, wasm-bindgen-macro was unexpectedly built, and compiler gave me the error:
I checked the project dependency with cargo tree and ravif should be the only crate using wasm-bindgen-macro. Deleting target or Cargo.lock, or even re-cloning the repository don't work.
Problem
gltf
crate v1.41 depends onimages
,images
has an optional dependencyravif
that is not enabled bygltf
, andravif
dependswasm-bindgen-macro
, which uses an unstable featureallow_internal_unstable
.However when I was trying to build a crate depending on
gltf
,wasm-bindgen-macro
was unexpectedly built, and compiler gave me the error:I checked the project dependency with
cargo tree
andravif
should be the only crate usingwasm-bindgen-macro
. Deletingtarget
orCargo.lock
, or even re-cloning the repository don't work.Steps
git clone https://github.com/chuigda/easy-gltf
cargo build
Possible Solution(s)
No response
Notes
No response
Version