Newby question about crates.io

Hi,

I know that cargo can get a library from a git repository or from crates.io.
Does crates.io use git repos as backend or how does it work?

crates.io uses a git repository as the index listing package registrations (cratesio-index), but it doesn't use git for the crates themselves. The crate sources themselves are packed into .crate files, uploaded to crates.io, and stored on S3.

If you're interested, crates.io is open source! The code is available at https://github.com/rust-lang/crates.io/.

Which, IIRC, are just .tar.gz files with the extension changed.