I'm working on a GUI application that analyzes Rust projects (Cargo.toml, etc.). I think it would be a nice touch if the application guessed where you have Rust projects on disk, and automatically showed you your latest few projects on startup, without the hassle of prompting for for them.
Searching all of $HOME for Cargo.toml is a bit too much (I bet people without SSDs would hate that), so I'm thinking about checking only a few typical directory names where Rust code could be expected.
All my rust projects are inside ~/pt/rust (I keep ~/src for downloaded external source code that's not being worked on, be it in Rust or something else)
I tend to have a Projects folder, where i follow the github pattern user/project eg:
~/Projects/[github user / organisation]/[project name] ...
becomes
~/Projects/daniel-samson/leap
~/Projects/hyperium/hyper
etc...
I keep my current code under C:\Projects since I'd be short on space otherwise, and then move it to D:\Rust.
I think that if you were to make your GUI be able to keep track of the projects (Move them around, and delete them if you wish, but inside the GUI) after the user made you aware of them, then that would probably remove most of the headache of finding the projects.
Hm… I am not sure I would want a program to try to find all Rust projects in a file system.
Especially if slow network filesystems are mounted there.
Passing a folder sounds like a pretty simple thing to me.
Mine are in ~/rustProjects. But I think that's my convention and not something that came from any toolchain.
Scanning the locate database (on UNIX, i.e. Mac / Linux) for "Cargo.toml" probably wouldn't be too bad in terms of filesystem IO. You'd need to exclude the ~/.cargo/ directory.
To provide an example not in ~, I have a second HDD that I store stuff on so it doesn't thrash my SSD too much, so all my Rust code + builds are at /hdd/project_name
Hmm... my code, in whatever language, lives anywhere and everywhere and can often move around.
I have work related code under a directory named after the company. Personal projects sitting in various places in my home directory. Odd experiments scattered here and there.
All of it is transient. I assume it's all sourced from github, bitbucket or whatever. Where it is the day I want to check it out and work on it is of no consequence.