As I understand it, the process goes something like this:
- Debian wants to package a Rust tool
- They examine the tool's Cargo.toml file to determine its immediate dependencies
- Those Rust dependencies are converted into Debian package names
- Generate a Debian package definition that lists those dependencies under "Build-Depends"
- When building the Debian package in an isolated environment, Build-Depends packages are installed, providing things like `rustc` and `cargo` as well as putting the dependencies' source into the "local dependencies" directory
- Cargo runs, configured to only look in the "local dependencies" directory for dependencies
- the resulting binary is scooped up and packaged