I think the issue is that you have build.rs in the root of the build package. Cargo thinks it is a build script and as such attempts to compile and run it before the main binary. rustc_metadata is not declared as build dependency, so when compiling as build script it fails. Try moving it to src/main.rs or src/bin/build.rs. In either case the explicit [[bin]] section shouldn't be necessary.
Fu*********
Ok so the issue is naming the file exactly build.rs makes cargo look for [build-dependencies]. Out of every name string possible in this universe, the build.rs costed me 2 hours. Change it to literally anything else will work.