{"id":13768592,"url":"https://github.com/fanzeyi/alfred-rustdoc","last_synced_at":"2025-07-24T14:02:58.158Z","repository":{"id":36783894,"uuid":"230173925","full_name":"fanzeyi/alfred-rustdoc","owner":"fanzeyi","description":"An Alfred workflow uses rustdoc's search index to provide local search result","archived":false,"fork":false,"pushed_at":"2022-09-28T13:13:01.000Z","size":7096,"stargazers_count":24,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-28T17:14:50.658Z","etag":null,"topics":["alfred-workflow","rust"],"latest_commit_sha":null,"homepage":"https://vimeo.com/381465041","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fanzeyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-26T01:30:34.000Z","updated_at":"2023-10-27T20:10:15.000Z","dependencies_parsed_at":"2023-01-17T04:46:44.548Z","dependency_job_id":null,"html_url":"https://github.com/fanzeyi/alfred-rustdoc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanzeyi%2Falfred-rustdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanzeyi%2Falfred-rustdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanzeyi%2Falfred-rustdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fanzeyi%2Falfred-rustdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fanzeyi","download_url":"https://codeload.github.com/fanzeyi/alfred-rustdoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251352624,"owners_count":21575864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfred-workflow","rust"],"created_at":"2024-08-03T16:01:23.206Z","updated_at":"2025-04-28T17:14:56.813Z","avatar_url":"https://github.com/fanzeyi.png","language":"JavaScript","funding_links":[],"categories":["Developer"],"sub_categories":[],"readme":"Alfred-rustdoc\n==============\n\nAn Alfred workflow for searching Rust crate documentations on docs.rs. It uses\nthe search index file built during `cargo doc` to generate typeahead list in\nAlfred, and it opens docs.rs for you.\n\n![preview](./assets/preview.png)\n\nIt supports the same query syntax in `cargo-doc`. For example, you can use `fn:`\nto priortize functions in the search result, or use `vec -\u003e usize` to search all\nthe functions that accepts a `Vec` as parameter and returns an `usize`. For\ndetails, please read the \"search tricks\" section from `cargo doc` (press \"h\" in\nany documentation generated by `cargo doc`):\n\n\u003e Prefix searches with a type followed by a colon (e.g., fn:) to restrict the\n\u003esearch to a given type.\n\u003e\n\u003eAccepted types are: fn, mod, struct, enum, trait, type, macro, and const.\n\u003e\n\u003eSearch functions by type signature (e.g., vec -\u003e usize or * -\u003e vec)\n\u003e\n\u003eSearch multiple things at once by splitting your query with comma (e.g., str,u8\n\u003eor String,struct:Vec,test)\n\u003e\n\u003eYou can look for items with an exact name by putting double quotes around your\n\u003erequest: \"string\"\n\u003e\n\u003eLook for items inside another one by searching for a path: vec::Vec\n\nInstallation\n------------\n\nThis workflow requires you have NodeJS installed in your system. To install\nNodeJS, run (w/ Homebrew):\n\n```\nbrew install node\n```\n\nThen download the .alfredworkflow file from the [Release][release] page.\n\nIf you want the workflow to use a copy of NodeJS that is not located at\n`/usr/local/bin/node`, please configure the environment variable\n`ALFRED_NODE_PATH` in Aflred to your copy of NodeJS.\n\n[release]: https://github.com/fanzeyi/alfred-rustdoc/releases\n\nDetails\n-------\n\nThis project directly uses the [`initSearch`][initSearch] function in\n[rust-lang/rust][rust] (hence written in NodeJS) with some stubs to make it work\noutside the browser. Then it fetches the `search-index.js` file generated during\nthe documentation building process (`cargo doc`) from docs.rs to serve the\nsearch result in Alfred. **The search-index.js is evaluated inside a sandbox\nprovided by [vm2][vm2]. This means this workflow will be running code downloaded\nfrom the Internet inside a sandbox.** This is really unfortunate since some big\ncrates rely on some JavaScript features to do compression (for example, [this\nsearch index file][nom-search-index]). Please let me know if there is an\nalternative way to acquire the search index without actually executing any\nremote code. \n\n[initSearch]: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/main.js#L528\n[rust]: https://github.com/rust-lang/rust\n[vm2]: https://github.com/patriksimek/vm2\n[nom-search-index]: https://docs.rs/nom/5.0.1/search-index-20190820-1.39.0-nightly-bea0372a1.js\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffanzeyi%2Falfred-rustdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffanzeyi%2Falfred-rustdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffanzeyi%2Falfred-rustdoc/lists"}