How to detect workspaces within a directory via CLI?
โ Rust ๐ 2025-07-29 ๐ค surdeus ๐๏ธ 10I have a repo containing a number of workspaces, and I have some CI actions that require handling each workspace. Is there a good way to identify all workspaces contained within this directory from a CLI command?
My best solution so far is rg -.cttoml '^[workspace([.].*)?]$' | cut -d: -f1 (gets all toml files with a top-level workspace key), which will detect every workspace but which could also detect miscellaneous other toml files (I donโt think crate Cargo.toml files can break this, but my repo also has other toml files for configuration etc.).
4 posts - 2 participants
๐ท๏ธ Rust_feed