├── .envrc ├── demo.gif ├── .gitignore ├── .cargo └── config ├── shell.nix ├── default.nix ├── Cargo.toml ├── Makefile ├── src ├── query.rs └── lib.rs ├── README.md ├── flake.nix ├── flake.lock ├── lua └── nvim-github-codesearch.lua └── Cargo.lock /.envrc: -------------------------------------------------------------------------------- 1 | if command -v nix &> /dev/null 2 | then 3 | use nix 4 | fi 5 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/napisani/nvim-github-codesearch/HEAD/demo.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /lua/deps/ 3 | target/ 4 | /.cargo/ 5 | !/.cargo/config 6 | /.git/ 7 | *.so 8 | *.dylib 9 | -------------------------------------------------------------------------------- /.cargo/config: -------------------------------------------------------------------------------- 1 | 2 | [target.x86_64-apple-darwin] 3 | rustflags = [ 4 | "-C", "link-arg=-undefined", 5 | "-C", "link-arg=dynamic_lookup", 6 | ] 7 | 8 | [target.aarch64-apple-darwin] 9 | rustflags = [ 10 | "-C", "link-arg=-undefined", 11 | "-C", "link-arg=dynamic_lookup", 12 | ] 13 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | (import 2 | ( 3 | let 4 | lock = builtins.fromJSON (builtins.readFile ./flake.lock); 5 | in 6 | fetchTarball { 7 | url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; 8 | sha256 = lock.nodes.flake-compat.locked.narHash; 9 | } 10 | ) 11 | { 12 | src = ./.; 13 | }).shellNix 14 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | (import 2 | ( 3 | let 4 | lock = builtins.fromJSON (builtins.readFile ./flake.lock); 5 | in 6 | fetchTarball { 7 | url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; 8 | sha256 = lock.nodes.flake-compat.locked.narHash; 9 | } 10 | ) 11 | { 12 | src = ./.; 13 | }).defaultNix 14 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "github_search" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [lib] 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | mlua = {version = "0.6", features = ["luajit", "module", "macros", "async"]} 13 | serde_json = "1.0.68" 14 | serde = { version = "1.0.130", features = ["derive"] } 15 | reqwest-retry = "0.2.2" 16 | reqwest = { version = "0.11", features = ["blocking", "json"] } 17 | reqwest-middleware = "0.2.1" 18 | urlencoding = "2.1.2" 19 | regex = "1.7.3" 20 | md5 = "0.7.0" 21 | tokio = { version = "1", features = ["full"] } 22 | futures = "0.3.28" 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build 2 | UNAME_S := $(shell uname -s) 3 | ifeq ($(UNAME_S),Darwin) 4 | LIB_EXT := dylib 5 | else 6 | LIB_EXT := so 7 | endif 8 | build: 9 | cargo build --release 10 | mkdir -p ./lua/deps/ 11 | mkdir -p ./lib/ 12 | 13 | # Remove old shared library 14 | rm -f ./lua/libgithub_search.so 15 | 16 | # Copy new shared library to target directory 17 | # NOTE: Use .so even on Mac due to weird issue loading .dylib 18 | # https://github.com/Joakker/lua-json5/issues/4 19 | # https://github.com/neovim/neovim/issues/21749#issuecomment-1418427487 20 | cp ./target/release/libgithub_search.$(LIB_EXT) ./lua/libgithub_search.so 21 | 22 | # If your Rust project has dependencies, 23 | # you'll need to do this as well 24 | cp ./target/release/deps/*.rlib ./lua/deps/ 25 | -------------------------------------------------------------------------------- /src/query.rs: -------------------------------------------------------------------------------- 1 | use std::{collections::HashMap, error::Error}; 2 | 3 | use regex::Regex; 4 | 5 | pub struct SearchQuery { 6 | pub search_term: String, 7 | pub restrictions: HashMap, 8 | } 9 | 10 | impl SearchQuery { 11 | fn parse_search_term(query: &str) -> Result> { 12 | let re = Regex::new(r"([a-zA-Z0-9\-_]+):").unwrap(); 13 | let tokens = re.split(query).collect::>(); 14 | let term = tokens.first(); 15 | if let Some(term) = term { 16 | return Ok(term.trim().to_string()); 17 | } 18 | Err(Box::new(std::io::Error::new( 19 | std::io::ErrorKind::Other, 20 | "failed to parse search term", 21 | ))) 22 | } 23 | fn parse_restrictions(query: &str) -> Result, Box> { 24 | let re = Regex::new(r"([a-zA-Z0-9\-_]+):([\S]+)").unwrap(); 25 | let restrictions: HashMap = re 26 | .captures_iter(query) 27 | .map(|cap| { 28 | let key = cap.get(1).unwrap().as_str().to_string(); 29 | let value = cap.get(2).unwrap().as_str().to_string(); 30 | (key, value) 31 | }) 32 | .collect::>(); 33 | Ok(restrictions) 34 | } 35 | pub fn from_query_string(query: &str) -> Result> { 36 | Ok(Self { 37 | search_term: Self::parse_search_term(query)?, 38 | restrictions: Self::parse_restrictions(query)?, 39 | }) 40 | } 41 | } 42 | 43 | #[cfg(test)] 44 | mod tests { 45 | use super::*; 46 | #[test] 47 | fn test_parse_search_term() { 48 | let query = "foo bar language:rust"; 49 | let term = SearchQuery::from_query_string(query).unwrap(); 50 | assert_eq!(term.search_term, "foo bar"); 51 | assert_eq!(term.restrictions["language"], "rust"); 52 | } 53 | #[test] 54 | fn test_parse_search_term_multiple_restrictions() { 55 | let query = "foo bar language:rust user:alvin"; 56 | let term = SearchQuery::from_query_string(query).unwrap(); 57 | assert_eq!(term.search_term, "foo bar"); 58 | assert_eq!(term.restrictions["language"], "rust"); 59 | assert_eq!(term.restrictions["user"], "alvin"); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## nvim-github-codesearch 2 | 3 | nvim-github-codesearch is a neovim plugin that allows you to submit searches against the Github Code Search API and display the results within neovim. The results can be displayed either as a quickfix list or within Telescope (telescope is entirely optional). 4 | 5 | ### Demo 6 | ![Demo](https://github.com/napisani/nvim-github-codesearch/blob/main/demo.gif) 7 | 8 | ### Installation 9 | 10 | Here is how to install nvim-github-codesearch using `packer` 11 | ```lua 12 | -- it is critical to have the 'run' key provided because this 13 | -- plugin is a combination of lua and rust, 14 | -- with out this parameter the plugin will miss the compilation step entirely 15 | use {'napisani/nvim-github-codesearch', run = 'make'} 16 | ``` 17 | Install using `lazy.nvim` 18 | ```lua 19 | {'napisani/nvim-github-codesearch', build = 'make'} 20 | ``` 21 | 22 | ### Configuration + Usage 23 | Here is how to setup this plugin: 24 | ```lua 25 | local gh_search = require("nvim-github-codesearch") 26 | gh_search.setup({ 27 | -- an optional table entry to explicitly configure the API key to use for Github API requests. 28 | -- alternatively, you can configure this parameter by export an environment variable named "GITHUB_AUTH_TOKEN" 29 | github_auth_token = "", 30 | 31 | -- this table entry is optional, if not provided "https://api.github.com" will be used by default 32 | -- otherwise this parameter can be used to configure a different Github API URL. 33 | github_api_url = "https://api.github.com", 34 | 35 | -- whether to use telescope to display the github search results or not 36 | use_telescope = false, 37 | }) 38 | 39 | -- Usage 40 | 41 | -- this will display a prompt to enter search terms 42 | gh_search.prompt() 43 | 44 | -- this will submit a search for the designated query without displaying a prompt 45 | gh_search.search("some query") 46 | 47 | -- removes any temp files created by nvim-github-codesearch 48 | gh_search.cleanup() 49 | 50 | ``` 51 | 52 | ## What to enter into the prompt 53 | 54 | the text that is captured from the prompt will get parsed and urlencoded, then sent directly to the Github code search API. 55 | 56 | The first part of the query is just the search terms, followed by key-value pairs of restrictions. 57 | IE: 58 | 59 | `join_all language:rust` 60 | 61 | `System.out.println user:napisani in:readme` 62 | 63 | Acceptable search terms are well documented here: 64 | https://docs.github.com/en/rest/search?apiVersion=2022-11-28#search-code 65 | 66 | 67 | 68 | ## Dependencies 69 | 70 | As of right now, the current version nvim-github-codesearch assumes that the machine its being installed on already has cargo/rust installed and available on the PATH. 71 | If you don't already have rust setup on your machine, please run the one-liner shell command available on the official rust docs to install it before installing nvim-github-codesearch: 72 | https://www.rust-lang.org/tools/install 73 | 74 | 75 | ## Nix (optional) 76 | if you use nix you can build the app using this command 77 | ```bash 78 | nix-shell 79 | make 80 | ``` 81 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "dev env for secret_inject"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | utils.url = "github:numtide/flake-utils"; 7 | rust-overlay.url = "github:oxalica/rust-overlay"; 8 | crate2nix = { 9 | url = "github:kolloch/crate2nix"; 10 | flake = false; 11 | }; 12 | flake-compat = { 13 | url = "github:edolstra/flake-compat"; 14 | flake = false; 15 | }; 16 | }; 17 | 18 | outputs = { self, nixpkgs, utils, rust-overlay, crate2nix, ... }: 19 | let 20 | name = "nvim-github-codesearch"; 21 | in 22 | utils.lib.eachDefaultSystem 23 | (system: 24 | let 25 | # Imports 26 | pkgs = import nixpkgs { 27 | inherit system; 28 | overlays = [ 29 | rust-overlay.overlay 30 | (self: super: { 31 | # Because rust-overlay bundles multiple rust packages into one 32 | # derivation, specify that mega-bundle here, so that crate2nix 33 | # will use them automatically. 34 | rustc = self.rust-bin.stable.latest.default; 35 | cargo = self.rust-bin.stable.latest.default; 36 | }) 37 | ]; 38 | }; 39 | inherit (import "${crate2nix}/tools.nix" { inherit pkgs; }) 40 | generatedCargoNix; 41 | 42 | # Create the cargo2nix project 43 | project = pkgs.callPackage 44 | (generatedCargoNix { 45 | inherit name; 46 | src = ./.; 47 | }) 48 | { 49 | # Individual crate overrides go here 50 | # Example: https://github.com/balsoft/simple-osd-daemons/blob/6f85144934c0c1382c7a4d3a2bbb80106776e270/flake.nix#L28-L50 51 | defaultCrateOverrides = pkgs.defaultCrateOverrides // { 52 | # The app crate itself is overriden here. Typically we 53 | # configure non-Rust dependencies (see below) here. 54 | ${name} = oldAttrs: { 55 | inherit buildInputs nativeBuildInputs; 56 | } // buildEnvVars; 57 | }; 58 | }; 59 | 60 | # Configuration for the non-Rust dependencies 61 | buildInputs = with pkgs; [ 62 | openssl.dev 63 | luajit 64 | pkg-config 65 | # darwin.apple_sdk.frameworks.Security 66 | libiconv 67 | openssl 68 | /* openssl */ 69 | ] ++ (if pkgs.system == "x86_64-darwin" || pkgs.system == "aarch64-darwin" then [ 70 | darwin.apple_sdk.frameworks.Security 71 | ] else [ ]); 72 | nativeBuildInputs = with pkgs; [ 73 | rustc 74 | cargo 75 | nixpkgs-fmt 76 | openssl.dev 77 | /* luajit */ 78 | /* pkg-config */ 79 | ]; 80 | buildEnvVars = { 81 | PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; 82 | }; 83 | in 84 | rec { 85 | packages.${name} = project.rootCrate.build; 86 | 87 | # `nix build` 88 | defaultPackage = packages.${name}; 89 | 90 | # `nix run` 91 | apps.${name} = utils.lib.mkApp { 92 | inherit name; 93 | drv = packages.${name}; 94 | }; 95 | defaultApp = apps.${name}; 96 | 97 | # `nix develop` 98 | devShell = pkgs.mkShell 99 | { 100 | inherit buildInputs nativeBuildInputs; 101 | RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; 102 | } // buildEnvVars; 103 | } 104 | ); 105 | } 106 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "crate2nix": { 4 | "flake": false, 5 | "locked": { 6 | "lastModified": 1681086579, 7 | "narHash": "sha256-MEcdG7EXkFsmrTo1/X5tq7UDFY6enHdl65k0wbTCuD0=", 8 | "owner": "kolloch", 9 | "repo": "crate2nix", 10 | "rev": "1b042dab3928aaa37421a83d4e1023e7a79527e2", 11 | "type": "github" 12 | }, 13 | "original": { 14 | "owner": "kolloch", 15 | "repo": "crate2nix", 16 | "type": "github" 17 | } 18 | }, 19 | "flake-compat": { 20 | "flake": false, 21 | "locked": { 22 | "lastModified": 1673956053, 23 | "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", 24 | "owner": "edolstra", 25 | "repo": "flake-compat", 26 | "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", 27 | "type": "github" 28 | }, 29 | "original": { 30 | "owner": "edolstra", 31 | "repo": "flake-compat", 32 | "type": "github" 33 | } 34 | }, 35 | "flake-utils": { 36 | "inputs": { 37 | "systems": "systems" 38 | }, 39 | "locked": { 40 | "lastModified": 1681202837, 41 | "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", 42 | "owner": "numtide", 43 | "repo": "flake-utils", 44 | "rev": "cfacdce06f30d2b68473a46042957675eebb3401", 45 | "type": "github" 46 | }, 47 | "original": { 48 | "owner": "numtide", 49 | "repo": "flake-utils", 50 | "type": "github" 51 | } 52 | }, 53 | "nixpkgs": { 54 | "locked": { 55 | "lastModified": 1682453498, 56 | "narHash": "sha256-WoWiAd7KZt5Eh6n+qojcivaVpnXKqBsVgpixpV2L9CE=", 57 | "owner": "nixos", 58 | "repo": "nixpkgs", 59 | "rev": "c8018361fa1d1650ee8d4b96294783cf564e8a7f", 60 | "type": "github" 61 | }, 62 | "original": { 63 | "owner": "nixos", 64 | "ref": "nixos-unstable", 65 | "repo": "nixpkgs", 66 | "type": "github" 67 | } 68 | }, 69 | "nixpkgs_2": { 70 | "locked": { 71 | "lastModified": 1681358109, 72 | "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", 73 | "owner": "NixOS", 74 | "repo": "nixpkgs", 75 | "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", 76 | "type": "github" 77 | }, 78 | "original": { 79 | "owner": "NixOS", 80 | "ref": "nixpkgs-unstable", 81 | "repo": "nixpkgs", 82 | "type": "github" 83 | } 84 | }, 85 | "root": { 86 | "inputs": { 87 | "crate2nix": "crate2nix", 88 | "flake-compat": "flake-compat", 89 | "nixpkgs": "nixpkgs", 90 | "rust-overlay": "rust-overlay", 91 | "utils": "utils" 92 | } 93 | }, 94 | "rust-overlay": { 95 | "inputs": { 96 | "flake-utils": "flake-utils", 97 | "nixpkgs": "nixpkgs_2" 98 | }, 99 | "locked": { 100 | "lastModified": 1682475596, 101 | "narHash": "sha256-hQS8kPq5mSIhLZTRlCt1LHMBJtrOkWiXtvtizaU1e1Q=", 102 | "owner": "oxalica", 103 | "repo": "rust-overlay", 104 | "rev": "4d1bb70dd1231d0cd1d76deffe7bf0b6127185ea", 105 | "type": "github" 106 | }, 107 | "original": { 108 | "owner": "oxalica", 109 | "repo": "rust-overlay", 110 | "type": "github" 111 | } 112 | }, 113 | "systems": { 114 | "locked": { 115 | "lastModified": 1681028828, 116 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 117 | "owner": "nix-systems", 118 | "repo": "default", 119 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 120 | "type": "github" 121 | }, 122 | "original": { 123 | "owner": "nix-systems", 124 | "repo": "default", 125 | "type": "github" 126 | } 127 | }, 128 | "systems_2": { 129 | "locked": { 130 | "lastModified": 1681028828, 131 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 132 | "owner": "nix-systems", 133 | "repo": "default", 134 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 135 | "type": "github" 136 | }, 137 | "original": { 138 | "owner": "nix-systems", 139 | "repo": "default", 140 | "type": "github" 141 | } 142 | }, 143 | "utils": { 144 | "inputs": { 145 | "systems": "systems_2" 146 | }, 147 | "locked": { 148 | "lastModified": 1681202837, 149 | "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", 150 | "owner": "numtide", 151 | "repo": "flake-utils", 152 | "rev": "cfacdce06f30d2b68473a46042957675eebb3401", 153 | "type": "github" 154 | }, 155 | "original": { 156 | "owner": "numtide", 157 | "repo": "flake-utils", 158 | "type": "github" 159 | } 160 | } 161 | }, 162 | "root": "root", 163 | "version": 7 164 | } 165 | -------------------------------------------------------------------------------- /lua/nvim-github-codesearch.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | ---@class Config 3 | ---@field public github_auth_token string the github api token to use for each request. 4 | ---@field public github_api_url string the base url to use for github api requests. the default is "https://api.github.com" 5 | ---@field public use_telescope boolean whether to use telescope for user interaction or not. the default is false. 6 | local Config = {} 7 | 8 | local github_auth_token 9 | local github_api_url 10 | local use_telescope = false 11 | local lib_gh_search = require("libgithub_search") 12 | 13 | ---@param config Config the configuration object 14 | M.setup = function(config) 15 | if not config then 16 | return 17 | end 18 | github_api_url = config.github_api_url or "https://api.github.com" 19 | github_auth_token = config.github_auth_token or os.getenv("GITHUB_AUTH_TOKEN") 20 | if config.use_telescope ~= nil then 21 | use_telescope = config.use_telescope 22 | end 23 | if not github_auth_token then 24 | error( 25 | "github api token not found. please set it in the config or in the GITHUB_AUTH_TOKEN environment variable or configure the github_auth_token when calling setup(...)" 26 | ) 27 | return 28 | end 29 | lib_gh_search = require("libgithub_search") 30 | end 31 | 32 | local function result_item_to_qflist_entry(item) 33 | return { 34 | -- bufnr = entry.bufnr, 35 | filename = item.downloaded_local_path, 36 | lnum = 1, 37 | col = 1, 38 | text = item.result_entry_full_name, 39 | } 40 | end 41 | local function send_all_to_qf(results) 42 | local qf_entries = {} 43 | for _, result_item in ipairs(results) do 44 | table.insert(qf_entries, result_item_to_qflist_entry(result_item)) 45 | end 46 | vim.fn.setqflist(qf_entries, ' ') 47 | local qf_title = string.format([[github results: (%s)]], 'term') 48 | vim.fn.setqflist({}, "a", { title = qf_title }) 49 | vim.cmd("copen") 50 | end 51 | local telescope_search_cb_jump = function(self, bufnr, query) 52 | if not query then 53 | return 54 | end 55 | vim.api.nvim_buf_call(bufnr, function() 56 | pcall(vim.fn.matchdelete, self.state.hl_id, self.state.winid) 57 | vim.cmd("norm! gg") 58 | vim.fn.search(query, "W") 59 | vim.cmd("norm! zz") 60 | self.state.hl_id = vim.fn.matchadd("TelescopePreviewMatch", query) 61 | end) 62 | end 63 | local function notify(err, level_in) 64 | if err then 65 | if level_in == nil then 66 | level_in = "ERROR" 67 | end 68 | local level = vim.log.levels[level_in] 69 | vim.notify(err, level, { 70 | title = "nvim-github-codesearch", 71 | }) 72 | return true 73 | end 74 | return false 75 | end 76 | 77 | local function select_with_telescope(results) 78 | local pickers = require("telescope.pickers") 79 | local actions = require("telescope.actions") 80 | local action_state = require("telescope.actions.state") 81 | local previewers = require("telescope.previewers") 82 | local finders = require("telescope.finders") 83 | local conf = require("telescope.config").values 84 | pickers 85 | .new({}, { 86 | prompt_title = "Select github search result: ", 87 | finder = finders.new_table({ 88 | results = results, 89 | entry_maker = function(item) 90 | return { 91 | value = item.downloaded_local_path, 92 | text = item.result_entry_full_name, 93 | ordinal = item.result_entry_full_name, 94 | display = item.result_entry_full_name, 95 | item = item, 96 | } 97 | end, 98 | }), 99 | sorter = conf.file_sorter({}), 100 | previewer = previewers.new_buffer_previewer({ 101 | title = "Results", 102 | define_preview = function(self, entry) 103 | if not entry or not entry.item then 104 | return 105 | end 106 | local item = entry.item 107 | if item["error"] ~= nil then 108 | notify(item["error"]) 109 | return 110 | end 111 | conf.buffer_previewer_maker(item.downloaded_local_path, self.state.bufnr, { 112 | bufname = self.state.bufname, 113 | callback = function(bufnr) 114 | telescope_search_cb_jump(self, bufnr, item.original_search_term) 115 | end, 116 | }) 117 | end, 118 | }), 119 | attach_mappings = function(prompt_bufnr) 120 | actions.select_default:replace(function() 121 | actions.close(prompt_bufnr) 122 | local selection = action_state.get_selected_entry() 123 | if selection then 124 | if selection.item["error"] ~= nil then 125 | notify(selection.item["error"]) 126 | return 127 | end 128 | vim.cmd(":edit " .. selection.item.downloaded_local_path) 129 | end 130 | end) 131 | return true 132 | end, 133 | }) 134 | :find() 135 | end 136 | -- search github for the given query. If use_telescope is true, use telescope to display results. 137 | -- Otherwise, display results in the quickfix list. 138 | -- @param query string the search term + restrictions to use 139 | M.search = function(query) 140 | local results = lib_gh_search.request_codesearch({ 141 | query = query, 142 | token = github_auth_token, 143 | url = github_api_url, 144 | }) 145 | if results == nil then 146 | notify("an unknown error occurred while searching github code") 147 | return 148 | end 149 | if results["error"] ~= nil then 150 | notify(results["error"]) 151 | return 152 | end 153 | if use_telescope then 154 | select_with_telescope(results) 155 | else 156 | send_all_to_qf(results) 157 | end 158 | return results 159 | end 160 | -- prompt the user for a search term + restrictions. Then, search github and display results. 161 | M.prompt = function() 162 | local input = vim.fn.input("Search GitHub code: ") 163 | if input == nil or input == "" then 164 | return 165 | end 166 | M.search(input) 167 | end 168 | -- clean up any tempfiles created by nvim-github-codesearch 169 | M.cleanup = function() 170 | lib_gh_search.cleanup() 171 | end 172 | 173 | return M 174 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | mod query; 2 | use futures::future; 3 | use mlua::prelude::{Lua, LuaResult, LuaTable}; 4 | use reqwest::header; 5 | use reqwest_middleware::{ClientBuilder, ClientWithMiddleware}; 6 | use reqwest_retry::{policies::ExponentialBackoff, RetryTransientMiddleware}; 7 | use serde::{Deserialize, Serialize}; 8 | use std::{ 9 | env, 10 | error::Error, 11 | fs::{self, File}, 12 | io::Cursor, 13 | path::PathBuf, 14 | }; 15 | use tokio::task::JoinHandle; 16 | 17 | #[derive(Default, Debug, Clone, PartialEq, Deserialize, Serialize)] 18 | struct SearchResults { 19 | total_count: u32, 20 | incomplete_results: bool, 21 | items: Vec, 22 | } 23 | 24 | #[derive(Default, Debug, Clone, PartialEq, Deserialize, Serialize)] 25 | struct GithubAPIError { 26 | message: String, 27 | } 28 | 29 | #[derive(Default, Debug, Clone, PartialEq, Deserialize, Serialize)] 30 | struct SearchResult { 31 | name: String, 32 | path: String, 33 | sha: String, 34 | url: String, 35 | git_url: String, 36 | html_url: String, 37 | score: f32, 38 | repository: Repository, 39 | } 40 | 41 | #[derive(Default, Debug, Clone, PartialEq, Deserialize, Serialize)] 42 | struct Repository { 43 | name: String, 44 | full_name: String, 45 | } 46 | 47 | #[derive(Default, Debug, Clone, PartialEq, Deserialize, Serialize)] 48 | struct DownloadResponse { 49 | download_url: String, 50 | } 51 | fn get_headers(token: &str) -> header::HeaderMap { 52 | let mut headers = header::HeaderMap::new(); 53 | let token_header = format!("Bearer {}", token); 54 | headers.insert( 55 | "Authorization", 56 | header::HeaderValue::from_str(&token_header) 57 | .expect("failed to format authroization header"), 58 | ); 59 | headers.insert( 60 | "X-GitHub-Api-Version", 61 | header::HeaderValue::from_static("2022-11-28"), 62 | ); 63 | headers.insert( 64 | "User-Agent", 65 | header::HeaderValue::from_static("nvim-github-codesearch"), 66 | ); 67 | headers 68 | } 69 | 70 | fn get_github_request_client() -> Result> { 71 | // Retry up to 3 times with increasing intervals between attempts. 72 | let retry_policy = ExponentialBackoff::builder().build_with_max_retries(3); 73 | let client = ClientBuilder::new(reqwest::Client::new()) 74 | .with(RetryTransientMiddleware::new_with_policy(retry_policy)) 75 | .build(); 76 | // .map_err(|e| Box::new(e) as Box) 77 | Ok(client) 78 | } 79 | 80 | fn cleanup_temp_files() -> Result<(), Box> { 81 | let dir = env::temp_dir().join("nvimghs"); 82 | if dir.exists() { 83 | fs::remove_dir_all(dir)?; 84 | } 85 | Ok(()) 86 | } 87 | 88 | async fn download_file<'a, 'b>( 89 | url: String, 90 | filename: String, 91 | token: String, 92 | ) -> Result> { 93 | let headers = get_headers(&token); 94 | let client = get_github_request_client()?; 95 | let dir = env::temp_dir().join("nvimghs"); 96 | fs::create_dir_all(&dir)?; 97 | let res = client.get(&url) 98 | .headers(headers) 99 | .send().await?; 100 | if !res.status().is_success() { 101 | let search_error = res 102 | .json::() 103 | .await 104 | .expect("failed to parse error from github download response"); 105 | return Err(Box::new(std::io::Error::new( 106 | std::io::ErrorKind::Other, 107 | format!("Github responded with an error: {}", search_error.message), 108 | ))); 109 | } 110 | let download_res = res 111 | .json::() 112 | .await 113 | .expect("failed to parse json from github download response"); 114 | let headers = get_headers(&token); 115 | let res = client 116 | .get(download_res.download_url) 117 | .headers(headers) 118 | .send().await?; 119 | let digest = md5::compute(url); 120 | let temp_file_name = format!("{:x}-{}", digest, filename); 121 | let path = dir.join(temp_file_name); 122 | if path.exists() { 123 | return Ok(path); 124 | } 125 | let mut file = File::create(path.clone())?; 126 | let mut content = Cursor::new(res.bytes().await.unwrap()); 127 | std::io::copy(&mut content, &mut file)?; 128 | Ok(path) 129 | } 130 | async fn request_codesearch( 131 | query: &str, 132 | url: &str, 133 | token: &str, 134 | ) -> Result> { 135 | let headers = get_headers(token); 136 | let client = get_github_request_client()?; 137 | let query = urlencoding::encode(query); 138 | let res = client 139 | .get(format!("{}/search/code?q={}", url, query)) 140 | .headers(headers) 141 | .send() 142 | .await?; 143 | if !res.status().is_success() { 144 | let search_error = res 145 | .json::() 146 | .await 147 | .expect("failed to parse error from github search response"); 148 | return Err(Box::new(std::io::Error::new( 149 | std::io::ErrorKind::Other, 150 | format!("Github responded with an error: {}", search_error.message), 151 | ))); 152 | } 153 | let results = res 154 | .json::() 155 | .await 156 | .expect("failed to parse json from github search response"); 157 | Ok(results) 158 | } 159 | 160 | #[tokio::main] 161 | async fn search_and_download_results<'a>( 162 | lua: &'a Lua, 163 | args: LuaTable, 164 | ) -> Result, Box> { 165 | let query = args.get::<_, String>("query")?; 166 | let url = args.get::<_, String>("url")?; 167 | let token = args.get::<_, String>("token")?; 168 | let parsed_query = query::SearchQuery::from_query_string(&query); 169 | if let Err(err) = parsed_query { 170 | let lua_table = lua.create_table()?; 171 | lua_table.set("error", err.to_string())?; 172 | return Ok(lua_table); 173 | } 174 | let parsed_query = parsed_query.unwrap(); 175 | let results = request_codesearch(&query, &url, &token).await; 176 | 177 | let lua_table = lua.create_table()?; 178 | if let Err(err) = results { 179 | lua_table.set("error", err.to_string())?; 180 | return Ok(lua_table); 181 | } 182 | let results = results.unwrap(); 183 | let tasks: Vec> = results 184 | .items 185 | .iter() 186 | .map(|item| { 187 | ( 188 | item.url.to_string(), 189 | item.name.to_string(), 190 | token.to_string(), 191 | ) 192 | }) 193 | .map(|(url, name, token)| { 194 | tokio::spawn(async move { 195 | download_file(url.to_string(), name, token) 196 | .await 197 | .map_err(|e| { 198 | std::io::Error::new( 199 | std::io::ErrorKind::Other, 200 | format!("failed to download file from url:{} {}", url, e), 201 | ) 202 | }) 203 | }) 204 | }) 205 | .collect::>(); 206 | let task_results = future::join_all(tasks).await; 207 | for (i, item) in results.items.iter().enumerate() { 208 | let lua_item = lua.create_table()?; 209 | lua_item.set("name", item.name.to_string())?; 210 | lua_item.set("path", item.path.to_string())?; 211 | lua_item.set("sha", item.sha.to_string())?; 212 | lua_item.set("url", item.url.to_string())?; 213 | lua_item.set("git_url", item.git_url.to_string())?; 214 | lua_item.set("html_url", item.html_url.to_string())?; 215 | lua_item.set("score", item.score)?; 216 | lua_item.set("original_search_term", parsed_query.search_term.to_string())?; 217 | // this is the name display value for all search result items 218 | lua_item.set( 219 | "result_entry_full_name", 220 | format!("{}: {}", item.repository.full_name, item.path), 221 | )?; 222 | let download = task_results 223 | .get(i) 224 | .unwrap() 225 | .as_ref() 226 | .expect("failed to get refrence from task result"); 227 | if let Err(err) = download { 228 | lua_item.set("error", err.to_string())?; 229 | } else { 230 | let download = download 231 | .as_ref() 232 | .expect("failed to get refrence from task result"); 233 | // this is the path to the downloaded file to be used in previews / buffer open commands 234 | lua_item.set("downloaded_local_path", download.to_str())?; 235 | } 236 | lua_table.set(i + 1, lua_item)?; 237 | } 238 | Ok(lua_table) 239 | } 240 | #[mlua::lua_module] 241 | fn libgithub_search(lua: &Lua) -> LuaResult { 242 | let exports = lua.create_table()?; 243 | let cleanup_fn = lua 244 | .create_function(|_, ()| { 245 | cleanup_temp_files().expect("failed to cleanup temp files"); 246 | Ok(()) 247 | }) 248 | .unwrap(); 249 | exports 250 | .set("cleanup", cleanup_fn) 251 | .expect("failed to create lua cleanup_fn"); 252 | let search_fn = lua 253 | .create_async_function(|lua, args: LuaTable| async move { 254 | Ok(search_and_download_results(lua, args).unwrap()) 255 | }) 256 | .expect("failed to create lua search_fn"); 257 | exports 258 | .set("request_codesearch", search_fn) 259 | .expect("failed to set search_fn on exported lua table"); 260 | Ok(exports) 261 | } 262 | 263 | #[cfg(test)] 264 | mod tests { 265 | use super::*; 266 | use std::env; 267 | #[tokio::test] 268 | async fn request_codesearch_returns_results() { 269 | let result = 270 | request_codesearch("test", "https://api.github.com", env!("GIT_NPM_AUTH_TOKEN")).await; 271 | assert!(result.is_ok()); 272 | } 273 | 274 | #[tokio::test] 275 | async fn download_file_returns_path() { 276 | let url = "https://api.github.com/repositories/683527/contents/test.data/positiveUpdate/ObsInjectionsData.test?ref=9fe69622a29a3f1a230254018271a3187b54db56"; 277 | let result = download_file( 278 | url.to_string(), 279 | "manifest.txt".to_string(), 280 | env!("GIT_NPM_AUTH_TOKEN").to_string(), 281 | ) 282 | .await; 283 | println!("result: {:?}", result); 284 | assert!(result.is_ok()); 285 | } 286 | } 287 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.20" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "android_system_properties" 16 | version = "0.1.5" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 19 | dependencies = [ 20 | "libc", 21 | ] 22 | 23 | [[package]] 24 | name = "anyhow" 25 | version = "1.0.70" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" 28 | 29 | [[package]] 30 | name = "async-trait" 31 | version = "0.1.68" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" 34 | dependencies = [ 35 | "proc-macro2", 36 | "quote", 37 | "syn 2.0.15", 38 | ] 39 | 40 | [[package]] 41 | name = "autocfg" 42 | version = "1.1.0" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 45 | 46 | [[package]] 47 | name = "base64" 48 | version = "0.21.0" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 51 | 52 | [[package]] 53 | name = "bitflags" 54 | version = "1.3.2" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 57 | 58 | [[package]] 59 | name = "bstr" 60 | version = "0.2.17" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 63 | dependencies = [ 64 | "memchr", 65 | ] 66 | 67 | [[package]] 68 | name = "bumpalo" 69 | version = "3.12.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 72 | 73 | [[package]] 74 | name = "bytes" 75 | version = "1.4.0" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 78 | 79 | [[package]] 80 | name = "cc" 81 | version = "1.0.79" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 84 | 85 | [[package]] 86 | name = "cfg-if" 87 | version = "1.0.0" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 90 | 91 | [[package]] 92 | name = "chrono" 93 | version = "0.4.24" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" 96 | dependencies = [ 97 | "iana-time-zone", 98 | "num-integer", 99 | "num-traits", 100 | "winapi", 101 | ] 102 | 103 | [[package]] 104 | name = "codespan-reporting" 105 | version = "0.11.1" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 108 | dependencies = [ 109 | "termcolor", 110 | "unicode-width", 111 | ] 112 | 113 | [[package]] 114 | name = "core-foundation" 115 | version = "0.9.3" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 118 | dependencies = [ 119 | "core-foundation-sys", 120 | "libc", 121 | ] 122 | 123 | [[package]] 124 | name = "core-foundation-sys" 125 | version = "0.8.4" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" 128 | 129 | [[package]] 130 | name = "cxx" 131 | version = "1.0.94" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" 134 | dependencies = [ 135 | "cc", 136 | "cxxbridge-flags", 137 | "cxxbridge-macro", 138 | "link-cplusplus", 139 | ] 140 | 141 | [[package]] 142 | name = "cxx-build" 143 | version = "1.0.94" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" 146 | dependencies = [ 147 | "cc", 148 | "codespan-reporting", 149 | "once_cell", 150 | "proc-macro2", 151 | "quote", 152 | "scratch", 153 | "syn 2.0.15", 154 | ] 155 | 156 | [[package]] 157 | name = "cxxbridge-flags" 158 | version = "1.0.94" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" 161 | 162 | [[package]] 163 | name = "cxxbridge-macro" 164 | version = "1.0.94" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" 167 | dependencies = [ 168 | "proc-macro2", 169 | "quote", 170 | "syn 2.0.15", 171 | ] 172 | 173 | [[package]] 174 | name = "either" 175 | version = "1.8.1" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 178 | 179 | [[package]] 180 | name = "encoding_rs" 181 | version = "0.8.32" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 184 | dependencies = [ 185 | "cfg-if", 186 | ] 187 | 188 | [[package]] 189 | name = "errno" 190 | version = "0.3.1" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 193 | dependencies = [ 194 | "errno-dragonfly", 195 | "libc", 196 | "windows-sys 0.48.0", 197 | ] 198 | 199 | [[package]] 200 | name = "errno-dragonfly" 201 | version = "0.1.2" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 204 | dependencies = [ 205 | "cc", 206 | "libc", 207 | ] 208 | 209 | [[package]] 210 | name = "fastrand" 211 | version = "1.9.0" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 214 | dependencies = [ 215 | "instant", 216 | ] 217 | 218 | [[package]] 219 | name = "fnv" 220 | version = "1.0.7" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 223 | 224 | [[package]] 225 | name = "foreign-types" 226 | version = "0.3.2" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 229 | dependencies = [ 230 | "foreign-types-shared", 231 | ] 232 | 233 | [[package]] 234 | name = "foreign-types-shared" 235 | version = "0.1.1" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 238 | 239 | [[package]] 240 | name = "form_urlencoded" 241 | version = "1.1.0" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 244 | dependencies = [ 245 | "percent-encoding", 246 | ] 247 | 248 | [[package]] 249 | name = "futures" 250 | version = "0.3.28" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 253 | dependencies = [ 254 | "futures-channel", 255 | "futures-core", 256 | "futures-executor", 257 | "futures-io", 258 | "futures-sink", 259 | "futures-task", 260 | "futures-util", 261 | ] 262 | 263 | [[package]] 264 | name = "futures-channel" 265 | version = "0.3.28" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 268 | dependencies = [ 269 | "futures-core", 270 | "futures-sink", 271 | ] 272 | 273 | [[package]] 274 | name = "futures-core" 275 | version = "0.3.28" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 278 | 279 | [[package]] 280 | name = "futures-executor" 281 | version = "0.3.28" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 284 | dependencies = [ 285 | "futures-core", 286 | "futures-task", 287 | "futures-util", 288 | ] 289 | 290 | [[package]] 291 | name = "futures-io" 292 | version = "0.3.28" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 295 | 296 | [[package]] 297 | name = "futures-macro" 298 | version = "0.3.28" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 301 | dependencies = [ 302 | "proc-macro2", 303 | "quote", 304 | "syn 2.0.15", 305 | ] 306 | 307 | [[package]] 308 | name = "futures-sink" 309 | version = "0.3.28" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 312 | 313 | [[package]] 314 | name = "futures-task" 315 | version = "0.3.28" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 318 | 319 | [[package]] 320 | name = "futures-util" 321 | version = "0.3.28" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 324 | dependencies = [ 325 | "futures-channel", 326 | "futures-core", 327 | "futures-io", 328 | "futures-macro", 329 | "futures-sink", 330 | "futures-task", 331 | "memchr", 332 | "pin-project-lite", 333 | "pin-utils", 334 | "slab", 335 | ] 336 | 337 | [[package]] 338 | name = "getrandom" 339 | version = "0.2.9" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 342 | dependencies = [ 343 | "cfg-if", 344 | "js-sys", 345 | "libc", 346 | "wasi", 347 | "wasm-bindgen", 348 | ] 349 | 350 | [[package]] 351 | name = "github_search" 352 | version = "0.1.0" 353 | dependencies = [ 354 | "futures", 355 | "md5", 356 | "mlua", 357 | "regex", 358 | "reqwest", 359 | "reqwest-middleware", 360 | "reqwest-retry", 361 | "serde", 362 | "serde_json", 363 | "tokio", 364 | "urlencoding", 365 | ] 366 | 367 | [[package]] 368 | name = "h2" 369 | version = "0.3.17" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" 372 | dependencies = [ 373 | "bytes", 374 | "fnv", 375 | "futures-core", 376 | "futures-sink", 377 | "futures-util", 378 | "http", 379 | "indexmap", 380 | "slab", 381 | "tokio", 382 | "tokio-util", 383 | "tracing", 384 | ] 385 | 386 | [[package]] 387 | name = "hashbrown" 388 | version = "0.12.3" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 391 | 392 | [[package]] 393 | name = "hermit-abi" 394 | version = "0.2.6" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 397 | dependencies = [ 398 | "libc", 399 | ] 400 | 401 | [[package]] 402 | name = "hermit-abi" 403 | version = "0.3.1" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" 406 | 407 | [[package]] 408 | name = "http" 409 | version = "0.2.9" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 412 | dependencies = [ 413 | "bytes", 414 | "fnv", 415 | "itoa", 416 | ] 417 | 418 | [[package]] 419 | name = "http-body" 420 | version = "0.4.5" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 423 | dependencies = [ 424 | "bytes", 425 | "http", 426 | "pin-project-lite", 427 | ] 428 | 429 | [[package]] 430 | name = "httparse" 431 | version = "1.8.0" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 434 | 435 | [[package]] 436 | name = "httpdate" 437 | version = "1.0.2" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 440 | 441 | [[package]] 442 | name = "hyper" 443 | version = "0.14.26" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" 446 | dependencies = [ 447 | "bytes", 448 | "futures-channel", 449 | "futures-core", 450 | "futures-util", 451 | "h2", 452 | "http", 453 | "http-body", 454 | "httparse", 455 | "httpdate", 456 | "itoa", 457 | "pin-project-lite", 458 | "socket2", 459 | "tokio", 460 | "tower-service", 461 | "tracing", 462 | "want", 463 | ] 464 | 465 | [[package]] 466 | name = "hyper-tls" 467 | version = "0.5.0" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 470 | dependencies = [ 471 | "bytes", 472 | "hyper", 473 | "native-tls", 474 | "tokio", 475 | "tokio-native-tls", 476 | ] 477 | 478 | [[package]] 479 | name = "iana-time-zone" 480 | version = "0.1.56" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" 483 | dependencies = [ 484 | "android_system_properties", 485 | "core-foundation-sys", 486 | "iana-time-zone-haiku", 487 | "js-sys", 488 | "wasm-bindgen", 489 | "windows", 490 | ] 491 | 492 | [[package]] 493 | name = "iana-time-zone-haiku" 494 | version = "0.1.1" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 497 | dependencies = [ 498 | "cxx", 499 | "cxx-build", 500 | ] 501 | 502 | [[package]] 503 | name = "idna" 504 | version = "0.3.0" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 507 | dependencies = [ 508 | "unicode-bidi", 509 | "unicode-normalization", 510 | ] 511 | 512 | [[package]] 513 | name = "indexmap" 514 | version = "1.9.3" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 517 | dependencies = [ 518 | "autocfg", 519 | "hashbrown", 520 | ] 521 | 522 | [[package]] 523 | name = "instant" 524 | version = "0.1.12" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 527 | dependencies = [ 528 | "cfg-if", 529 | "js-sys", 530 | "wasm-bindgen", 531 | "web-sys", 532 | ] 533 | 534 | [[package]] 535 | name = "io-lifetimes" 536 | version = "1.0.10" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" 539 | dependencies = [ 540 | "hermit-abi 0.3.1", 541 | "libc", 542 | "windows-sys 0.48.0", 543 | ] 544 | 545 | [[package]] 546 | name = "ipnet" 547 | version = "2.7.2" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" 550 | 551 | [[package]] 552 | name = "itertools" 553 | version = "0.10.5" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 556 | dependencies = [ 557 | "either", 558 | ] 559 | 560 | [[package]] 561 | name = "itoa" 562 | version = "1.0.6" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 565 | 566 | [[package]] 567 | name = "js-sys" 568 | version = "0.3.61" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 571 | dependencies = [ 572 | "wasm-bindgen", 573 | ] 574 | 575 | [[package]] 576 | name = "lazy_static" 577 | version = "1.4.0" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 580 | 581 | [[package]] 582 | name = "libc" 583 | version = "0.2.141" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" 586 | 587 | [[package]] 588 | name = "link-cplusplus" 589 | version = "1.0.8" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 592 | dependencies = [ 593 | "cc", 594 | ] 595 | 596 | [[package]] 597 | name = "linux-raw-sys" 598 | version = "0.3.1" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" 601 | 602 | [[package]] 603 | name = "lock_api" 604 | version = "0.4.9" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 607 | dependencies = [ 608 | "autocfg", 609 | "scopeguard", 610 | ] 611 | 612 | [[package]] 613 | name = "log" 614 | version = "0.4.17" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 617 | dependencies = [ 618 | "cfg-if", 619 | ] 620 | 621 | [[package]] 622 | name = "md5" 623 | version = "0.7.0" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" 626 | 627 | [[package]] 628 | name = "memchr" 629 | version = "2.5.0" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 632 | 633 | [[package]] 634 | name = "mime" 635 | version = "0.3.17" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 638 | 639 | [[package]] 640 | name = "mime_guess" 641 | version = "2.0.4" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" 644 | dependencies = [ 645 | "mime", 646 | "unicase", 647 | ] 648 | 649 | [[package]] 650 | name = "mio" 651 | version = "0.8.6" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 654 | dependencies = [ 655 | "libc", 656 | "log", 657 | "wasi", 658 | "windows-sys 0.45.0", 659 | ] 660 | 661 | [[package]] 662 | name = "mlua" 663 | version = "0.6.6" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "4235d7e740d73d7429df6f176c81b248f05c39d67264d45a7d8cecb67c227f6f" 666 | dependencies = [ 667 | "bstr", 668 | "cc", 669 | "futures-core", 670 | "futures-task", 671 | "futures-util", 672 | "mlua_derive", 673 | "num-traits", 674 | "once_cell", 675 | "pkg-config", 676 | ] 677 | 678 | [[package]] 679 | name = "mlua_derive" 680 | version = "0.6.0" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "1713774a29db53a48932596dc943439dd54eb56a9efaace716719cc10fa82d5b" 683 | dependencies = [ 684 | "itertools", 685 | "once_cell", 686 | "proc-macro-error", 687 | "proc-macro2", 688 | "quote", 689 | "regex", 690 | "syn 1.0.109", 691 | ] 692 | 693 | [[package]] 694 | name = "native-tls" 695 | version = "0.2.11" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 698 | dependencies = [ 699 | "lazy_static", 700 | "libc", 701 | "log", 702 | "openssl", 703 | "openssl-probe", 704 | "openssl-sys", 705 | "schannel", 706 | "security-framework", 707 | "security-framework-sys", 708 | "tempfile", 709 | ] 710 | 711 | [[package]] 712 | name = "num-integer" 713 | version = "0.1.45" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 716 | dependencies = [ 717 | "autocfg", 718 | "num-traits", 719 | ] 720 | 721 | [[package]] 722 | name = "num-traits" 723 | version = "0.2.15" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 726 | dependencies = [ 727 | "autocfg", 728 | ] 729 | 730 | [[package]] 731 | name = "num_cpus" 732 | version = "1.15.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 735 | dependencies = [ 736 | "hermit-abi 0.2.6", 737 | "libc", 738 | ] 739 | 740 | [[package]] 741 | name = "once_cell" 742 | version = "1.17.1" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 745 | 746 | [[package]] 747 | name = "openssl" 748 | version = "0.10.50" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" 751 | dependencies = [ 752 | "bitflags", 753 | "cfg-if", 754 | "foreign-types", 755 | "libc", 756 | "once_cell", 757 | "openssl-macros", 758 | "openssl-sys", 759 | ] 760 | 761 | [[package]] 762 | name = "openssl-macros" 763 | version = "0.1.1" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 766 | dependencies = [ 767 | "proc-macro2", 768 | "quote", 769 | "syn 2.0.15", 770 | ] 771 | 772 | [[package]] 773 | name = "openssl-probe" 774 | version = "0.1.5" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 777 | 778 | [[package]] 779 | name = "openssl-sys" 780 | version = "0.9.85" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" 783 | dependencies = [ 784 | "cc", 785 | "libc", 786 | "pkg-config", 787 | "vcpkg", 788 | ] 789 | 790 | [[package]] 791 | name = "parking_lot" 792 | version = "0.11.2" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 795 | dependencies = [ 796 | "instant", 797 | "lock_api", 798 | "parking_lot_core 0.8.6", 799 | ] 800 | 801 | [[package]] 802 | name = "parking_lot" 803 | version = "0.12.1" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 806 | dependencies = [ 807 | "lock_api", 808 | "parking_lot_core 0.9.7", 809 | ] 810 | 811 | [[package]] 812 | name = "parking_lot_core" 813 | version = "0.8.6" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" 816 | dependencies = [ 817 | "cfg-if", 818 | "instant", 819 | "libc", 820 | "redox_syscall 0.2.16", 821 | "smallvec", 822 | "winapi", 823 | ] 824 | 825 | [[package]] 826 | name = "parking_lot_core" 827 | version = "0.9.7" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 830 | dependencies = [ 831 | "cfg-if", 832 | "libc", 833 | "redox_syscall 0.2.16", 834 | "smallvec", 835 | "windows-sys 0.45.0", 836 | ] 837 | 838 | [[package]] 839 | name = "percent-encoding" 840 | version = "2.2.0" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 843 | 844 | [[package]] 845 | name = "pin-project-lite" 846 | version = "0.2.9" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 849 | 850 | [[package]] 851 | name = "pin-utils" 852 | version = "0.1.0" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 855 | 856 | [[package]] 857 | name = "pkg-config" 858 | version = "0.3.26" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 861 | 862 | [[package]] 863 | name = "ppv-lite86" 864 | version = "0.2.17" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 867 | 868 | [[package]] 869 | name = "proc-macro-error" 870 | version = "1.0.4" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 873 | dependencies = [ 874 | "proc-macro-error-attr", 875 | "proc-macro2", 876 | "quote", 877 | "syn 1.0.109", 878 | "version_check", 879 | ] 880 | 881 | [[package]] 882 | name = "proc-macro-error-attr" 883 | version = "1.0.4" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 886 | dependencies = [ 887 | "proc-macro2", 888 | "quote", 889 | "version_check", 890 | ] 891 | 892 | [[package]] 893 | name = "proc-macro2" 894 | version = "1.0.56" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 897 | dependencies = [ 898 | "unicode-ident", 899 | ] 900 | 901 | [[package]] 902 | name = "quote" 903 | version = "1.0.26" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 906 | dependencies = [ 907 | "proc-macro2", 908 | ] 909 | 910 | [[package]] 911 | name = "rand" 912 | version = "0.8.5" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 915 | dependencies = [ 916 | "libc", 917 | "rand_chacha", 918 | "rand_core", 919 | ] 920 | 921 | [[package]] 922 | name = "rand_chacha" 923 | version = "0.3.1" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 926 | dependencies = [ 927 | "ppv-lite86", 928 | "rand_core", 929 | ] 930 | 931 | [[package]] 932 | name = "rand_core" 933 | version = "0.6.4" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 936 | dependencies = [ 937 | "getrandom", 938 | ] 939 | 940 | [[package]] 941 | name = "redox_syscall" 942 | version = "0.2.16" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 945 | dependencies = [ 946 | "bitflags", 947 | ] 948 | 949 | [[package]] 950 | name = "redox_syscall" 951 | version = "0.3.5" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 954 | dependencies = [ 955 | "bitflags", 956 | ] 957 | 958 | [[package]] 959 | name = "regex" 960 | version = "1.7.3" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" 963 | dependencies = [ 964 | "aho-corasick", 965 | "memchr", 966 | "regex-syntax", 967 | ] 968 | 969 | [[package]] 970 | name = "regex-syntax" 971 | version = "0.6.29" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 974 | 975 | [[package]] 976 | name = "reqwest" 977 | version = "0.11.16" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" 980 | dependencies = [ 981 | "base64", 982 | "bytes", 983 | "encoding_rs", 984 | "futures-core", 985 | "futures-util", 986 | "h2", 987 | "http", 988 | "http-body", 989 | "hyper", 990 | "hyper-tls", 991 | "ipnet", 992 | "js-sys", 993 | "log", 994 | "mime", 995 | "mime_guess", 996 | "native-tls", 997 | "once_cell", 998 | "percent-encoding", 999 | "pin-project-lite", 1000 | "serde", 1001 | "serde_json", 1002 | "serde_urlencoded", 1003 | "tokio", 1004 | "tokio-native-tls", 1005 | "tower-service", 1006 | "url", 1007 | "wasm-bindgen", 1008 | "wasm-bindgen-futures", 1009 | "web-sys", 1010 | "winreg", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "reqwest-middleware" 1015 | version = "0.2.1" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "99c50db2c7ccd815f976473dd7d0bde296f8c3b77c383acf4fc021cdcf10852b" 1018 | dependencies = [ 1019 | "anyhow", 1020 | "async-trait", 1021 | "http", 1022 | "reqwest", 1023 | "serde", 1024 | "task-local-extensions", 1025 | "thiserror", 1026 | ] 1027 | 1028 | [[package]] 1029 | name = "reqwest-retry" 1030 | version = "0.2.2" 1031 | source = "registry+https://github.com/rust-lang/crates.io-index" 1032 | checksum = "48d0fd6ef4c6d23790399fe15efc8d12cd9f3d4133958f9bd7801ee5cbaec6c4" 1033 | dependencies = [ 1034 | "anyhow", 1035 | "async-trait", 1036 | "chrono", 1037 | "futures", 1038 | "getrandom", 1039 | "http", 1040 | "hyper", 1041 | "parking_lot 0.11.2", 1042 | "reqwest", 1043 | "reqwest-middleware", 1044 | "retry-policies", 1045 | "task-local-extensions", 1046 | "tokio", 1047 | "tracing", 1048 | "wasm-timer", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "retry-policies" 1053 | version = "0.1.2" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "e09bbcb5003282bcb688f0bae741b278e9c7e8f378f561522c9806c58e075d9b" 1056 | dependencies = [ 1057 | "anyhow", 1058 | "chrono", 1059 | "rand", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "rustix" 1064 | version = "0.37.11" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" 1067 | dependencies = [ 1068 | "bitflags", 1069 | "errno", 1070 | "io-lifetimes", 1071 | "libc", 1072 | "linux-raw-sys", 1073 | "windows-sys 0.48.0", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "ryu" 1078 | version = "1.0.13" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 1081 | 1082 | [[package]] 1083 | name = "schannel" 1084 | version = "0.1.21" 1085 | source = "registry+https://github.com/rust-lang/crates.io-index" 1086 | checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" 1087 | dependencies = [ 1088 | "windows-sys 0.42.0", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "scopeguard" 1093 | version = "1.1.0" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1096 | 1097 | [[package]] 1098 | name = "scratch" 1099 | version = "1.0.5" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" 1102 | 1103 | [[package]] 1104 | name = "security-framework" 1105 | version = "2.8.2" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" 1108 | dependencies = [ 1109 | "bitflags", 1110 | "core-foundation", 1111 | "core-foundation-sys", 1112 | "libc", 1113 | "security-framework-sys", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "security-framework-sys" 1118 | version = "2.8.0" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" 1121 | dependencies = [ 1122 | "core-foundation-sys", 1123 | "libc", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "serde" 1128 | version = "1.0.160" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 1131 | dependencies = [ 1132 | "serde_derive", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "serde_derive" 1137 | version = "1.0.160" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 1140 | dependencies = [ 1141 | "proc-macro2", 1142 | "quote", 1143 | "syn 2.0.15", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "serde_json" 1148 | version = "1.0.96" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 1151 | dependencies = [ 1152 | "itoa", 1153 | "ryu", 1154 | "serde", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "serde_urlencoded" 1159 | version = "0.7.1" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1162 | dependencies = [ 1163 | "form_urlencoded", 1164 | "itoa", 1165 | "ryu", 1166 | "serde", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "signal-hook-registry" 1171 | version = "1.4.1" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1174 | dependencies = [ 1175 | "libc", 1176 | ] 1177 | 1178 | [[package]] 1179 | name = "slab" 1180 | version = "0.4.8" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1183 | dependencies = [ 1184 | "autocfg", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "smallvec" 1189 | version = "1.10.0" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1192 | 1193 | [[package]] 1194 | name = "socket2" 1195 | version = "0.4.9" 1196 | source = "registry+https://github.com/rust-lang/crates.io-index" 1197 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1198 | dependencies = [ 1199 | "libc", 1200 | "winapi", 1201 | ] 1202 | 1203 | [[package]] 1204 | name = "syn" 1205 | version = "1.0.109" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1208 | dependencies = [ 1209 | "proc-macro2", 1210 | "quote", 1211 | "unicode-ident", 1212 | ] 1213 | 1214 | [[package]] 1215 | name = "syn" 1216 | version = "2.0.15" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 1219 | dependencies = [ 1220 | "proc-macro2", 1221 | "quote", 1222 | "unicode-ident", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "task-local-extensions" 1227 | version = "0.1.4" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" 1230 | dependencies = [ 1231 | "pin-utils", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "tempfile" 1236 | version = "3.5.0" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" 1239 | dependencies = [ 1240 | "cfg-if", 1241 | "fastrand", 1242 | "redox_syscall 0.3.5", 1243 | "rustix", 1244 | "windows-sys 0.45.0", 1245 | ] 1246 | 1247 | [[package]] 1248 | name = "termcolor" 1249 | version = "1.2.0" 1250 | source = "registry+https://github.com/rust-lang/crates.io-index" 1251 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1252 | dependencies = [ 1253 | "winapi-util", 1254 | ] 1255 | 1256 | [[package]] 1257 | name = "thiserror" 1258 | version = "1.0.40" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 1261 | dependencies = [ 1262 | "thiserror-impl", 1263 | ] 1264 | 1265 | [[package]] 1266 | name = "thiserror-impl" 1267 | version = "1.0.40" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 1270 | dependencies = [ 1271 | "proc-macro2", 1272 | "quote", 1273 | "syn 2.0.15", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "tinyvec" 1278 | version = "1.6.0" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1281 | dependencies = [ 1282 | "tinyvec_macros", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "tinyvec_macros" 1287 | version = "0.1.1" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1290 | 1291 | [[package]] 1292 | name = "tokio" 1293 | version = "1.27.0" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" 1296 | dependencies = [ 1297 | "autocfg", 1298 | "bytes", 1299 | "libc", 1300 | "mio", 1301 | "num_cpus", 1302 | "parking_lot 0.12.1", 1303 | "pin-project-lite", 1304 | "signal-hook-registry", 1305 | "socket2", 1306 | "tokio-macros", 1307 | "windows-sys 0.45.0", 1308 | ] 1309 | 1310 | [[package]] 1311 | name = "tokio-macros" 1312 | version = "2.0.0" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" 1315 | dependencies = [ 1316 | "proc-macro2", 1317 | "quote", 1318 | "syn 2.0.15", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "tokio-native-tls" 1323 | version = "0.3.1" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1326 | dependencies = [ 1327 | "native-tls", 1328 | "tokio", 1329 | ] 1330 | 1331 | [[package]] 1332 | name = "tokio-util" 1333 | version = "0.7.7" 1334 | source = "registry+https://github.com/rust-lang/crates.io-index" 1335 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 1336 | dependencies = [ 1337 | "bytes", 1338 | "futures-core", 1339 | "futures-sink", 1340 | "pin-project-lite", 1341 | "tokio", 1342 | "tracing", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "tower-service" 1347 | version = "0.3.2" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1350 | 1351 | [[package]] 1352 | name = "tracing" 1353 | version = "0.1.37" 1354 | source = "registry+https://github.com/rust-lang/crates.io-index" 1355 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1356 | dependencies = [ 1357 | "cfg-if", 1358 | "pin-project-lite", 1359 | "tracing-attributes", 1360 | "tracing-core", 1361 | ] 1362 | 1363 | [[package]] 1364 | name = "tracing-attributes" 1365 | version = "0.1.23" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 1368 | dependencies = [ 1369 | "proc-macro2", 1370 | "quote", 1371 | "syn 1.0.109", 1372 | ] 1373 | 1374 | [[package]] 1375 | name = "tracing-core" 1376 | version = "0.1.30" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1379 | dependencies = [ 1380 | "once_cell", 1381 | ] 1382 | 1383 | [[package]] 1384 | name = "try-lock" 1385 | version = "0.2.4" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1388 | 1389 | [[package]] 1390 | name = "unicase" 1391 | version = "2.6.0" 1392 | source = "registry+https://github.com/rust-lang/crates.io-index" 1393 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1394 | dependencies = [ 1395 | "version_check", 1396 | ] 1397 | 1398 | [[package]] 1399 | name = "unicode-bidi" 1400 | version = "0.3.13" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 1403 | 1404 | [[package]] 1405 | name = "unicode-ident" 1406 | version = "1.0.8" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 1409 | 1410 | [[package]] 1411 | name = "unicode-normalization" 1412 | version = "0.1.22" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1415 | dependencies = [ 1416 | "tinyvec", 1417 | ] 1418 | 1419 | [[package]] 1420 | name = "unicode-width" 1421 | version = "0.1.10" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1424 | 1425 | [[package]] 1426 | name = "url" 1427 | version = "2.3.1" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1430 | dependencies = [ 1431 | "form_urlencoded", 1432 | "idna", 1433 | "percent-encoding", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "urlencoding" 1438 | version = "2.1.2" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" 1441 | 1442 | [[package]] 1443 | name = "vcpkg" 1444 | version = "0.2.15" 1445 | source = "registry+https://github.com/rust-lang/crates.io-index" 1446 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1447 | 1448 | [[package]] 1449 | name = "version_check" 1450 | version = "0.9.4" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1453 | 1454 | [[package]] 1455 | name = "want" 1456 | version = "0.3.0" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1459 | dependencies = [ 1460 | "log", 1461 | "try-lock", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "wasi" 1466 | version = "0.11.0+wasi-snapshot-preview1" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1469 | 1470 | [[package]] 1471 | name = "wasm-bindgen" 1472 | version = "0.2.84" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 1475 | dependencies = [ 1476 | "cfg-if", 1477 | "wasm-bindgen-macro", 1478 | ] 1479 | 1480 | [[package]] 1481 | name = "wasm-bindgen-backend" 1482 | version = "0.2.84" 1483 | source = "registry+https://github.com/rust-lang/crates.io-index" 1484 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 1485 | dependencies = [ 1486 | "bumpalo", 1487 | "log", 1488 | "once_cell", 1489 | "proc-macro2", 1490 | "quote", 1491 | "syn 1.0.109", 1492 | "wasm-bindgen-shared", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "wasm-bindgen-futures" 1497 | version = "0.4.34" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" 1500 | dependencies = [ 1501 | "cfg-if", 1502 | "js-sys", 1503 | "wasm-bindgen", 1504 | "web-sys", 1505 | ] 1506 | 1507 | [[package]] 1508 | name = "wasm-bindgen-macro" 1509 | version = "0.2.84" 1510 | source = "registry+https://github.com/rust-lang/crates.io-index" 1511 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 1512 | dependencies = [ 1513 | "quote", 1514 | "wasm-bindgen-macro-support", 1515 | ] 1516 | 1517 | [[package]] 1518 | name = "wasm-bindgen-macro-support" 1519 | version = "0.2.84" 1520 | source = "registry+https://github.com/rust-lang/crates.io-index" 1521 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 1522 | dependencies = [ 1523 | "proc-macro2", 1524 | "quote", 1525 | "syn 1.0.109", 1526 | "wasm-bindgen-backend", 1527 | "wasm-bindgen-shared", 1528 | ] 1529 | 1530 | [[package]] 1531 | name = "wasm-bindgen-shared" 1532 | version = "0.2.84" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 1535 | 1536 | [[package]] 1537 | name = "wasm-timer" 1538 | version = "0.2.5" 1539 | source = "registry+https://github.com/rust-lang/crates.io-index" 1540 | checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" 1541 | dependencies = [ 1542 | "futures", 1543 | "js-sys", 1544 | "parking_lot 0.11.2", 1545 | "pin-utils", 1546 | "wasm-bindgen", 1547 | "wasm-bindgen-futures", 1548 | "web-sys", 1549 | ] 1550 | 1551 | [[package]] 1552 | name = "web-sys" 1553 | version = "0.3.61" 1554 | source = "registry+https://github.com/rust-lang/crates.io-index" 1555 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 1556 | dependencies = [ 1557 | "js-sys", 1558 | "wasm-bindgen", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "winapi" 1563 | version = "0.3.9" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1566 | dependencies = [ 1567 | "winapi-i686-pc-windows-gnu", 1568 | "winapi-x86_64-pc-windows-gnu", 1569 | ] 1570 | 1571 | [[package]] 1572 | name = "winapi-i686-pc-windows-gnu" 1573 | version = "0.4.0" 1574 | source = "registry+https://github.com/rust-lang/crates.io-index" 1575 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1576 | 1577 | [[package]] 1578 | name = "winapi-util" 1579 | version = "0.1.5" 1580 | source = "registry+https://github.com/rust-lang/crates.io-index" 1581 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1582 | dependencies = [ 1583 | "winapi", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "winapi-x86_64-pc-windows-gnu" 1588 | version = "0.4.0" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1591 | 1592 | [[package]] 1593 | name = "windows" 1594 | version = "0.48.0" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" 1597 | dependencies = [ 1598 | "windows-targets 0.48.0", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "windows-sys" 1603 | version = "0.42.0" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1606 | dependencies = [ 1607 | "windows_aarch64_gnullvm 0.42.2", 1608 | "windows_aarch64_msvc 0.42.2", 1609 | "windows_i686_gnu 0.42.2", 1610 | "windows_i686_msvc 0.42.2", 1611 | "windows_x86_64_gnu 0.42.2", 1612 | "windows_x86_64_gnullvm 0.42.2", 1613 | "windows_x86_64_msvc 0.42.2", 1614 | ] 1615 | 1616 | [[package]] 1617 | name = "windows-sys" 1618 | version = "0.45.0" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1621 | dependencies = [ 1622 | "windows-targets 0.42.2", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "windows-sys" 1627 | version = "0.48.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1630 | dependencies = [ 1631 | "windows-targets 0.48.0", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "windows-targets" 1636 | version = "0.42.2" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1639 | dependencies = [ 1640 | "windows_aarch64_gnullvm 0.42.2", 1641 | "windows_aarch64_msvc 0.42.2", 1642 | "windows_i686_gnu 0.42.2", 1643 | "windows_i686_msvc 0.42.2", 1644 | "windows_x86_64_gnu 0.42.2", 1645 | "windows_x86_64_gnullvm 0.42.2", 1646 | "windows_x86_64_msvc 0.42.2", 1647 | ] 1648 | 1649 | [[package]] 1650 | name = "windows-targets" 1651 | version = "0.48.0" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 1654 | dependencies = [ 1655 | "windows_aarch64_gnullvm 0.48.0", 1656 | "windows_aarch64_msvc 0.48.0", 1657 | "windows_i686_gnu 0.48.0", 1658 | "windows_i686_msvc 0.48.0", 1659 | "windows_x86_64_gnu 0.48.0", 1660 | "windows_x86_64_gnullvm 0.48.0", 1661 | "windows_x86_64_msvc 0.48.0", 1662 | ] 1663 | 1664 | [[package]] 1665 | name = "windows_aarch64_gnullvm" 1666 | version = "0.42.2" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1669 | 1670 | [[package]] 1671 | name = "windows_aarch64_gnullvm" 1672 | version = "0.48.0" 1673 | source = "registry+https://github.com/rust-lang/crates.io-index" 1674 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1675 | 1676 | [[package]] 1677 | name = "windows_aarch64_msvc" 1678 | version = "0.42.2" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1681 | 1682 | [[package]] 1683 | name = "windows_aarch64_msvc" 1684 | version = "0.48.0" 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" 1686 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1687 | 1688 | [[package]] 1689 | name = "windows_i686_gnu" 1690 | version = "0.42.2" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1693 | 1694 | [[package]] 1695 | name = "windows_i686_gnu" 1696 | version = "0.48.0" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1699 | 1700 | [[package]] 1701 | name = "windows_i686_msvc" 1702 | version = "0.42.2" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1705 | 1706 | [[package]] 1707 | name = "windows_i686_msvc" 1708 | version = "0.48.0" 1709 | source = "registry+https://github.com/rust-lang/crates.io-index" 1710 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1711 | 1712 | [[package]] 1713 | name = "windows_x86_64_gnu" 1714 | version = "0.42.2" 1715 | source = "registry+https://github.com/rust-lang/crates.io-index" 1716 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1717 | 1718 | [[package]] 1719 | name = "windows_x86_64_gnu" 1720 | version = "0.48.0" 1721 | source = "registry+https://github.com/rust-lang/crates.io-index" 1722 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1723 | 1724 | [[package]] 1725 | name = "windows_x86_64_gnullvm" 1726 | version = "0.42.2" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1729 | 1730 | [[package]] 1731 | name = "windows_x86_64_gnullvm" 1732 | version = "0.48.0" 1733 | source = "registry+https://github.com/rust-lang/crates.io-index" 1734 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1735 | 1736 | [[package]] 1737 | name = "windows_x86_64_msvc" 1738 | version = "0.42.2" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1741 | 1742 | [[package]] 1743 | name = "windows_x86_64_msvc" 1744 | version = "0.48.0" 1745 | source = "registry+https://github.com/rust-lang/crates.io-index" 1746 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1747 | 1748 | [[package]] 1749 | name = "winreg" 1750 | version = "0.10.1" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1753 | dependencies = [ 1754 | "winapi", 1755 | ] 1756 | --------------------------------------------------------------------------------