If this is your first time building something, you’re just going to have to let it run. The first time can be excruciatingly slow, and Cargo provides no indication as to whether it’s making any progress. I think the longest I’ve waited is ~25 minutes.
If you’ve built the package before, and it’s trying to update the registry… you’ll just have to let it. Sometimes, Cargo decides it needs to update the registry, and you can’t convince it otherwise. I used to maintain a local mirror of the index to get around this, but that’s been broken or removed or something recently.
Right now, in practice, Rust isn’t a language you can use without an internet connection.