-
Notifications
You must be signed in to change notification settings - Fork 212
Grepping all the Rust code #134
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
Comments
You can grep through all the Rust crates on github on sourcegraph, e.g.: But I find it not so useful for looking up symbol definitions.. (Too noisy results.) @onur The PureScript symbol search works in this global way: I find it very useful to have this kind of search in PureScript and would really like to have it for Rust, too! |
I don't know how feasible this is. We currently have 251882 releases of 43725 different crates. The search index alone would be several gigabytes large and take several hours for most browsers to load (since it's JavaScript). As an alternative, there is a suggestion to search in all dependencies which seems more doable (and more helpful to the end user): #494
I think this would be better as an extension to https://github.com/rust-dev-tools/cargo-src. Right now docs.rs doesn't have an easy way to access all pages, it has to download each HTML individually from S3. Doing that for all files (even once!) would be extremely expensive. |
You could set up your hotkeys to search |
I'm going to close this, there are just too many crates for it to be feasible. If you like, you could run offline searches following the instructions in https://www.pietroalbini.org/blog/downloading-crates-io/, that would be significantly faster since it doesn't have to go through JavaScript or download the crates more than once. |
(Bringing over the discussion here, as suggested: rust-lang/crates.io#841)
GitHub already allows searching in the code, but it's not always easy to grep in all the Rust code: If the search term is generic and matches projects in other languages better, "Rust" won't be listed in the sidebar and you'll have to edit the URL manually to get what you need.
Example: https://github.com/search?utf8=%E2%9C%93&q=hello&type=Code
I think somewhere there should be an easy-to-use grep UI for the Rust projects. Does docs.rs have anything planned? If not, maybe we can have a UI to make it easier to search in GitHub for now? What do you think?
The text was updated successfully, but these errors were encountered: