import { CreateNodesV2 } from '@nx/devkit'; import { RustCacheOptions } from '../utils/rust-hasher'; export interface RustPluginOptions extends RustCacheOptions { buildTargetName?: string; testTargetName?: string; lintTargetName?: string; runTargetName?: string; } /** * Makes the Rust targets of every project cacheable, with the inputs that decide what a crate compiles to and the * artifacts cargo produces as outputs, so that an unchanged crate is restored from the Nx cache instead of being * rebuilt. * * Targets are added to projects Nx already knows, that is a directory holding a `Cargo.toml` next to a * `project.json` or a `package.json`. The plugin never turns a crate into a project of its own, so a nested crate * such as `apps/api/migration` keeps belonging to the project around it, the same rule `createDependencies` uses. * * For each such project it adds: * * - caching for every target the project already declares with one of this plugin's executors, whatever that * target is called, so that a `build-release` target is covered as well as `build`; * - a `build`, `test`, `lint` and, for a crate with a binary, `run` target for an actual Cargo package that * declares none of its own. A target name already taken by another executor is left alone. Virtual workspaces * receive caching settings only for explicitly declared Rust targets. * * Every target it adds carries a `targetDir` option, the same directory the executors default to. Cargo writes * there and the outputs are read from there, so the two cannot drift apart when a project overrides it. */ export declare const createNodesV2: CreateNodesV2;