package cargo type CargoManifest struct { Package `toml:"package"` Library Target `toml:"lib"` Binaries []Target `toml:"bin"` Tests []Target `toml:"test"` Dependencies map[string]Dependency `toml:"dependencies"` BuildDependencies map[string]Dependency `toml:"build-dependencies"` DevDependencies map[string]Dependency `toml:"dev-dependencies"` Target TargetTable `toml:"target"` } type Package struct { Name string `toml:"name"` Version string `toml:"version"` Edition string `toml:"edition"` RustVersion string `toml:"rust-version"` Workspace string `toml:"workspace"` Build string `toml:"build"` Links string `toml:"links"` Autolib bool `toml:"autolib"` Autobins bool `toml:"autobins"` Autotests bool `toml:"autotests"` Resolver string `toml:"resolver"` } type Target struct { Name string `toml:"name"` Path string `toml:"path"` Test bool `toml:"test"` ProcMacro bool `toml:"proc-macro"` Harness bool `toml:"harness"` CrateType []string `toml:"crate-type"` RequiredFeatures []string `toml:"required-features"` } // n.b. only crates.io and local dependencies are supported. type Dependency struct { Version string `toml:"version"` Path string `toml:"path"` DefaultFeatures bool `toml:"default-features"` Features []string `toml:"features"` Optional bool `toml:"optional"` Package string `toml:"package"` Workspace string `toml:"workspace"` } type DependenciesTable struct { Dependencies map[string]Dependency `toml:"dependencies"` } type TargetTable map[string]DependenciesTable