cargo::ops::cargo_package

# Function get_registry

Source

    fn get_registry(
        gctx: &GlobalContext,
        pkgs: &[&Package],
        reg_or_index: Option<RegistryOrIndex>,
    ) -> CargoResult<SourceId>

Expand description

Determine which registry the packages are for.

The registry only affects the built packages if there are dependencies within the packages that we’re packaging: if we’re packaging foo-bin and foo-lib, and foo-bin depends on foo-lib, then the foo-lib entry in foo-bin’s lockfile will depend on the registry that we’re building packages for.