Skip to main content

Module terminal

Module terminal 

Source
Expand description

Finds the crates of the terminal in the dependencies of a crate (01M54216PBE319RASGNMY9F0MR). riff-client holds no terminal code: the test riff_client_has_no_terminal_crate runs found on its Cargo.toml and on the Cargo.lock of the workspace.

The roots are the normal dependencies of the manifest, also those of a target and the build dependencies: not its dev dependencies. Then found follows each root through the lock file, so a crate of the terminal that comes through another crate counts too.

let manifest = "[dependencies]\nratatui.workspace = true\n";
assert_eq!(hygiene::terminal::found(manifest, ""), ["ratatui"]);

let manifest = "[dependencies]\nui = \"1\"\n\n[dev-dependencies]\nclap = \"4\"\n";
let lock = "[[package]]\nname = \"ui\"\ndependencies = [\n \"crossterm 0.29.0\",\n]\n";
assert_eq!(hygiene::terminal::found(manifest, lock), ["crossterm"]);

Constants§

TERMINAL
The crates of the terminal.

Functions§

dependencies
The names of the normal and the build dependencies of manifest, also those of a target. Not its dev dependencies.
found
The crates of TERMINAL that the crate of manifest (its Cargo.toml) depends on, through the packages of lock (a Cargo.lock). Sorted, each one time.