import { CargoMetadata, CargoPackage } from './cargo-metadata'; /** Cargo's configuration search order, from the working directory upwards. */ export declare function cargoDirectories(directory: string): string[]; export declare function cargoConfigFiles(directory: string, cargoHome?: string): string[]; export interface RustWorkspace { packages: Map; metadata: Map; /** Local candidates for patched packages, including optional/target-specific patches. */ patches: Map>>; /** Local dependencies reached through registry/git crates in a locked, offline resolution. */ resolvedDependencies: Map; sourceDirectories: Map>; resolutionInputs: Set; } /** * Read local Cargo packages without fetching the network or writing a lockfile. * Unlike a single --no-deps call, this follows path dependencies outside the workspace's members and * local [patch], [replace] and Cargo config path overrides. Keeping all candidates is conservative: * Cargo may choose different optional dependencies/patch versions with different executor flags. * With an existing lockfile, cached registry/git metadata can enrich the graph using --locked --offline. */ export declare function readRustWorkspace(manifests: string[]): RustWorkspace | null; /** All potential local dependencies, including optional, build, dev and patched dependencies. */ export declare function localDependencies(pkg: CargoPackage, workspace: RustWorkspace): string[]; export declare function dependencyClosure(packages: CargoPackage[], workspace: RustWorkspace): CargoPackage[]; /** Reuse metadata between build/test/lint hashes; refresh when any manifest or Cargo config changes. */ export declare function readCachedRustWorkspace(manifest: string): RustWorkspace | null;