Mystery of the `clib` and `inwelling` crates

I'm trying to use the tcl crate, which provides bindings for the Tcl programming language. However, I get compile errors from the crate not generating the raw bindings during build time that it uses to provide the higher-level bindings, even though I have Tcl and the associated C library installed and pkgconf can find them.

Looking into the code, it uses the clib crate from the same author to generate the bindings. In its build.rs, it uses metadata from its dependencies and uses them to figure out the C headers and libraries it needs to include in the build and generate bindings for, then does so.

The clib crate uses the inwelling crate, also from the same author, to receive the metadata it needs from its dependencies' Cargo.tomls. For the metadata to be received, the dependencies have to direct inwelling to give the metadata to clib in their build.rs'.

This must have worked at some point, but I don't understand how it ever did. Wouldn't clib be compiled before its dependencies', meaning its build.rs is run before any metadata is given to it? Did cargo build work in some different way before where this worked? Am I misunderstanding something? I'm deeply confused.

If it helps any, I'm on Nightly.

I think you mean "dependents" a lot of places you say "dependencies".

From a quick skim, it looks like inwelling searches the filesystem for Cargo.toml files and pulls the downstream data out of those which it finds itself.

Ah... that would explain it. Also, yeah, my brain got mixed up with dependencies and dependents. I guess I probably should clone the repos and add debug things to them so I can see the actual reason why the Tcl bindings aren't being generated.