From cargo to crates.io and back again
Channel: Jon Gjengset
Date: 11/02/2023

We implement a crate that unifies the types involved in the transit path between cargo publish, the Cargo registry API, and the Cargo index, and the conversions between them. The hope is that once this is polished up some more, cargo, crates.io, and the crates-io and crates-index crates will all be able to make use of a single crate for their type definitions.

The code at the end of the stream is available at https://github.com/jonhoo/cargo-index-transit.

0:00:00 Introduction
0:03:40 cargo publish
0:15:41 The crates.io index
0:34:23 Gathering type definitions
1:43:04 Trimming down the manifest type
2:00:00 The crates-index crate
2:08:29 Undoing type-erasing
2:19:23 Biobreak
2:22:04 The .crate manifest module
3:05:15 The publish module
4:02:26 The index module
4:55:42 Trying to hide from borrowck
5:08:09 Index conversion methods
5:49:52 Writing an end-to-end test
6:01:46 Aside: A missing pub in Cargo
6:10:34 Writing an end-to-end test (part 2)
6:25:37 toml_edit and DeserializeOwned
6:57:22 Writing an end-to-end test (part 3)
7:11:05 Re-using the test setup

Live version with chat: https://youtube.com/live/NL4vCWrzzg4