cargo::util::toml

Function read_manifest

Source
pub fn read_manifest(
    path: &Path,
    source_id: SourceId,
    gctx: &GlobalContext,
) -> CargoResult<EitherManifest>
Expand description

Loads a Cargo.toml from a file on disk.

This could result in a real or virtual manifest being returned.

A list of nested paths is also returned, one for each path dependency within the manifest. For virtual manifests, these paths can only come from patched or replaced dependencies. These paths are not canonicalized.