Skip to main content

Crate find_cargo_toml

Crate find_cargo_toml 

Source
Expand description

Find Cargo.toml (or a custom manifest filename) by walking up the directory tree.

Starts from a given path and yields every directory that contains the manifest file, from nearest to the root. Useful for locating workspace or package roots in Rust projects.

Structs§

FindIter
Iterator that walks upward from a directory and yields the full path to the manifest file whenever it exists. Yields paths from the directory nearest to the start path toward the root.

Functions§

find
Finds manifest files by walking up from input. Defaults to Cargo.toml.
find_from_current_dir
Convenience wrapper for find that uses the current working directory as the base. Equivalent to find(input, None::<PathBuf>, file_name).