-
-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use fd as a library? #837
Comments
As it currently exists not really. The Cargo.toml only defines a [bin] section and everything in the src/ directory exists within that binary. If some component of the binary was to be broken out into it's own workspace it could then be used as a library, pending approval from the maintainer. What is it you were looking to do? It is possible that the utility you are looking for is provided by a dependency to fd or otherwise exists on crates.io |
In particular the |
I would suggest against that, since I would wait at least until #760 is fixed for all command line options. Then try to convince @sharkdp to refactor it into a lib and cli frontend. See this article for accurate information (also linked in the issue). |
Sorry for that. Maybe that should have been pointed out as a breaking change in the release notes (https://github.com/sharkdp/fd/releases/tag/v8.3.0)
I know that this could be valuable for others. I have done the same (split into bin+library) with my command-line tools Given that the |
@sharkdp not really a very convincing argument but |
So what kind of applications would you all like to build with fd-as-a-library? |
Finding dependencies in some Linux environment automatically for development tools. Like finding QEMU and images to boot automatically, so the user doesn't have to constantly specify paths to things in a large build directory (Yocto is like this). I could just use the stdout though. |
I'm writing a dev-tool that needs to scan an entire filesystem for git repos, then store their config data. Subsequent runs pull from the stored file and either clone-and-set-up the repos again with all remotes & branches, or pick up new repositories and add them to the config. |
Pardon my ignorance. I'm new to rust.
I'd like to use fd's features in the program I'm writing. Is it possible to use a bin crate as a library? Is there some special I would need to do to make it work?
The text was updated successfully, but these errors were encountered: