import type { Coverage } from '../analyzers/tools/coverage';
import type { DepVulnFinding, SeverityCounts } from './capabilities/types';
import type { LanguageSupport, LintSeverity } from './types';
/**
 * Tier a clippy or rustc lint by its code name.
 *
 * clippy lint codes look like `clippy::needless_pass_by_value`.
 * rustc lint codes look like `unused_variables`, `dead_code`, etc.
 *
 * Most clippy lints are style / best-practice suggestions → low.
 * Only the correctness-group lints (hand-catalogued above) are
 * serious. rustc lints default to medium since `unused_*` and
 * `deprecated` are meaningful but rarely critical.
 */
export declare function mapClippyLintSeverity(code: string | undefined): LintSeverity;
/**
 * Extract the minimum patched semver from a RUSTSEC patched-range
 * string. cargo-audit emits requirement strings like:
 *
 *   `">=1.8.4"`            — single lower bound
 *   `">=1.8.4, <1.9.0"`    — line-restricted patch range
 *   `">= 1.8.4, < 1.9.0"`  — RUSTSEC's spaced convention
 *   `"^1.0.0"`             — caret operator
 *   `"1.8.4"`              — bare version
 *
 * Earlier revisions of `parseCargoAuditOutput` only stripped the
 * leading comparator, producing `"1.8.4, <1.9.0"` for the second
 * shape — unusable as a `cargo update --precise` argument. This
 * helper extracts the explicit `>=` floor when present (the minimum
 * patched version of that line); otherwise falls back to the first
 * semver-shaped token in the string. Surfaced by tokio@0.1.22 in
 * the cross-ecosystem benchmark fixture (Phase 10h.6.8).
 */
export declare function extractMinPatchedVersion(patchedRange: string): string;
/**
 * Pure parser for `cargo-audit --json` output. Extracted from the gather
 * function so it can be exhaustively unit-tested without a real Cargo
 * toolchain on the dev machine (10h.5 release-time validation runs the
 * full pipeline). Returns null when the input is malformed or contains
 * no vulnerabilities object; otherwise returns counts + findings ready
 * for downstream alias-fallback enrichment.
 */
export declare function parseCargoAuditOutput(raw: string): {
    counts: SeverityCounts;
    findings: DepVulnFinding[];
} | null;
/**
 * Pure parser for `cargo metadata --format-version 1`, returning a
 * per-crate-name index of the top-level manifest deps that transitively
 * pull that crate. Mirrors the TS pack's `buildTsTopLevelDepIndex`
 * shape so bom + HTML renders can use identical grouping logic.
 *
 * Cargo's resolve graph uses opaque package ids (e.g.
 * `openssl 0.10.50 (registry+...)`). We map id→name via `packages[]`
 * and then BFS starting from each direct dep of `resolve.root`
 * (derived from the workspace root's `resolve.nodes[i].dependencies`).
 *
 * Returns an empty map on malformed input rather than throwing — the
 * caller keeps attribution unset so dep-vuln gather still succeeds.
 */
export declare function buildRustTopLevelDepIndex(raw: string): Map<string, string[]>;
/**
 * Capture Rust `use` path specifiers from source text. Handles simple
 * paths (`use std::io;`) and grouped (`use std::{io, fs};`). Rust has
 * no file-level resolver — see note on the pack's capabilities slot —
 * so this is the only raw helper the imports capability needs.
 * Exported for unit tests.
 */
export declare function extractRustImportsRaw(content: string): string[];
export declare function parseLcov(raw: string, sourceFile: string, cwd: string): Coverage | null;
export declare const rust: LanguageSupport;
//# sourceMappingURL=rust.d.ts.map