RubyGems.org has their own web server and web services for publishing library versions and to allow the clients to fetch libraries and query the universal registry.
Small note: Cargo _does_ use an index (not the source code), in git, on GitHub. However, we're already doing the directory layout that they recommend in-thread, so we shouldn't have this specific problem.