Yesterday I was sitting in a restaurant in Amsterdam working on Rust projects over a 40Mbit/s high speed internet connection. Preparing the slides for my presentation tonight I run every code sample again.
This works until cargo needs to download a crate:
Unable to update registry `https://github.com/rust-lang/crates.io-index`
What breaks?
To be brief: building complex stuff needs these two
One crate I had locally was on gitlab.com, but this is out of tree, so I can work around it.
What works?
- docs.rs
- doc.rust-lang.org
- rust-lang.org
- rustup.rs
- users.rust-lang.org (except github login)
- internals.rust-lang.org (except github login)
So I can not complain about it because I can not login
What to do?
Infrastructure
The easy solution would be to ask github to enable IPv6. From what I can tell people complain since 2014 about that there appears to be no progress.
So the alternative would be to look for
- either a different platform to serve the content ourselves (interesting, but requires people)
- or a reverse proxy solution with a CDN. (maybe costs money?)
Both would have to be implemented with future cargo releases but the old releases could live on without major problems.
Error message
This error does not tell the relevant part about the lack of IPv4 connectivity. Even worse, if they try google.com (what I expect 90% of the people to do) then they see the internet working so rust must be broken.
cargo run
Updating crates.io index
warning: spurious network error (2 tries remaining): curl error:
; class=Net (12)
warning: spurious network error (1 tries remaining): curl error:
; class=Net (12)
error: failed to load source for a dependency on `threadpool`
Caused by:
Unable to update registry `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
curl error:
; class=Net (12)
Workarounds
First one could try a VPN or SSH but as with most public places the only allow TCP port 80 and 443 for HTTP and HTTPS traffic.
Another option could be to edit the local /etc/hosts
file and have some reverse proxy handy.
At last one could think of a HTTP proxy service. However most of them break the encryption, are mostly run by evil personnel and I can not recommend executing code that was transmitted without encryption or authentication over the internet.
The situation has been improved over 2016
After searching the forum I found this old post from 2016. All of the services managed directly by the rust project are reachable over IPv6, thank you to the people that did set it up.
What do you think? Which way can we go? Is there another (better) one?