Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Fix vendored-deps crates so ergo-rest can be published
On publishing dependencies that are specified by `path` are taken by `version` with `path` ignored.
I see two options:
1) Embed the vendored crates source files as modules of ergo-rest crate;
2) Publish vendored crates under an altered name;

I'd try 1) first and use 2) only as last resort.


Discussion / hints:
@kettlebell I totally forgot about `path` dependencies when I reviewed your PR. Could you please take care of this?
Sure no problem, will be able to in a few hours.

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4978fb853..42b2cfe92 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -76,7 +76,7 @@ jobs:
       - name: rust-tarpaulin code coverage check
         uses: actions-rs/tarpaulin@master
         with:
-          args: '--avoid-cfg-tarpaulin --timeout=360 -v --out Lcov --exclude-files bindings/*'
+          args: '--avoid-cfg-tarpaulin --timeout=360 -v --out Lcov --exclude-files bindings/* ergo-rest/src/reqwest.rs ergo-rest/src/reqwest/* ergo-rest/src/wasm_timer.rs ergo-rest/src/wasm_timer/*'
       # - name: Upload coverage report to Codecov
       #   if: matrix.os == 'ubuntu-latest'
       #   uses: codecov/codecov-action@v1
@@ -142,11 +142,6 @@ jobs:
           curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
           sudo apt-get -y install nodejs
       
-      - name: run `reqwest-wrap` WASM tests
-        run: |
-          cd vendored-deps/reqwest-wrap
-          wasm-pack test --chrome  --headless
-
       - name: run Wasm tests
         run: |
           cd bindings/ergo-lib-wasm
diff --git a/Cargo.toml b/Cargo.toml
index 472427309..b6d893762 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,9 +17,7 @@ members = [
     "bindings/ergo-lib-wasm",
     "bindings/ergo-lib-c-core",
     "bindings/ergo-lib-c",
-    "bindings/ergo-lib-jni",
-    "vendored-deps/wasm-timer",
-    "vendored-deps/reqwest-wrap"
+    "bindings/ergo-lib-jni"
 ]
 
 [profile.release]
diff --git a/ergo-rest/Cargo.toml b/ergo-rest/Cargo.toml
index 221bdf9e4..b21527d66 100644
--- a/ergo-rest/Cargo.toml
+++ b/ergo-rest/Cargo.toml
@@ -25,18 +25,49 @@ futures = "0.3"
 thiserror = "1"
 derive_more = "0.99"
 proptest-derive = {version = "0.3.0", optional = true }
-reqwest = { package = "reqwest-wrap", version = "0.11.10", path = "../vendored-deps/reqwest-wrap", features = ["json"] }
 serde = { version = "1.0", features = ["derive"]}
 serde_json = { version = "1.0", optional = true }
 url = "2.2"
+# Dependencies for `wasm-timer`
+parking_lot = "0.12"
+pin-utils = "0.1"
+# Dependencies for `reqwest`
+http = "0.2"
+bytes = "1.0"
+serde_urlencoded = "0.7.1"
 
 [target.'cfg(target_arch = "wasm32")'.dependencies]
 wasm-bindgen-futures = "0.4"
-wasm-timer = { version = "0.2.5", path = "../vendored-deps/wasm-timer" } 
+# Dependencies for `wasm-timer`
+js-sys = "0.3"
+wasm-bindgen = "0.2"
+# Depdencies for `reqwest`
+serde_json = "1.0"
+
+[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
+version = "0.3.25"
+features = [
+    "Headers",
+    "Request",
+    "RequestInit",
+    "RequestMode",
+    "AbortController",
+    "AbortSignal",
+    "Response",
+    "Window",
+    "FormData",
+    "Blob",
+    "BlobPropertyBag",
+    "ServiceWorkerGlobalScope",
+    "RequestCredentials",
+    "File",
+    "Performance"
+]
 
 [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
 tokio = { version = "1", features = ["full"] }
 tokio-stream = "0.1"
+reqwest = { version = "0.11.10", default-features = false, features = ["json"] }
 
 [dependencies.proptest]
 # wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
@@ -51,6 +82,12 @@ optional = true
 [features]
 json = ["serde_json"]
 arbitrary = ["proptest", "proptest-derive"]
+default = ["json"]
 
 [dev-dependencies]
 sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
+
+# Addition from `reqwest`
+[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
+wasm-bindgen = { version = "0.2.68", features = ["serde-serialize"] }
+wasm-bindgen-test = "0.3"
diff --git a/ergo-rest/README.md b/ergo-rest/README.md
index 283e6a646..c69ebb3ec 100644
--- a/ergo-rest/README.md
+++ b/ergo-rest/README.md
@@ -8,5 +8,28 @@ Ergo node REST API library
 ## Changelog
 See [CHANGELOG.md](CHANGELOG.md).
 
+## Notes on vendored dependencies
+
+This crate vendors two crates as sub-modules: `wasm-timer` and `reqwest`. We can't have them as
+sub-crates of `sigma-rust` due to issues around Github releases.
+
+### `wasm-timer`
+`wasm-timer` is a simple fork of the original repo at https://github.com/tomaka/wasm-timer. The
+crate has not been updated since August 2020, and has a dependency on an older version of the
+`parking_lot` which breaks our WASM build (details here:
+https://github.com/Amanieu/parking_lot/issues/269).
+
+All we've done is update crate dependencies, in particualar bumping `parking_lot` to version `0.12`.
+
+### `reqwest`
+This exists as a workaround that gives `reqwest` the ability to have request timeouts for the
+WASM platform (see https://github.com/seanmonstar/reqwest/issues/1135). Currently timeouts are
+only implemented in `reqwest` for non-WASM platforms. However there exists a yet-to-be-merged pull
+request (https://github.com/seanmonstar/reqwest/pull/1274) that implements timeouts under WASM.
+
+We vendor the WASM related code of `reqwest` and apply the above mentioned PR on top.
+This allows WASM-based dependendents of this crate to have timeouts for requests. Non-WASM users
+have access to the underlying `reqwest` crate without any modifications.
+
 ## Contributing
 See [Contributing](../CONTRIBUTING.md) guide.
diff --git a/ergo-rest/src/api.rs b/ergo-rest/src/api.rs
index 5452e3afc..2ca0f4df3 100644
--- a/ergo-rest/src/api.rs
+++ b/ergo-rest/src/api.rs
@@ -1,6 +1,7 @@
 //! REST API for the services in Ergo ecosystem (node, explorer, etc.)
 
-use reqwest::{header::CONTENT_TYPE, Client, RequestBuilder};
+use crate::reqwest;
+use crate::reqwest::{header::CONTENT_TYPE, Client, RequestBuilder};
 
 use crate::NodeConf;
 
diff --git a/ergo-rest/src/api/peer_discovery_internals.rs b/ergo-rest/src/api/peer_discovery_internals.rs
index e12f7d2c3..7c0a1b459 100644
--- a/ergo-rest/src/api/peer_discovery_internals.rs
+++ b/ergo-rest/src/api/peer_discovery_internals.rs
@@ -121,7 +121,7 @@ async fn peer_discovery_impl<
     let rx_timeout_signal = {
         let (tx, rx) = futures::channel::oneshot::channel::<()>();
         wasm_bindgen_futures::spawn_local(async move {
-            let _ = wasm_timer::Delay::new(timeout).await;
+            let _ = crate::wasm_timer::Delay::new(timeout).await;
             let _ = tx.send(());
         });
         rx.into_stream()
diff --git a/ergo-rest/src/bulk_req.rs b/ergo-rest/src/bulk_req.rs
index 1f1c38bf6..04f022edf 100644
--- a/ergo-rest/src/bulk_req.rs
+++ b/ergo-rest/src/bulk_req.rs
@@ -1,8 +1,7 @@
+use crate::reqwest::{Request, Response};
 use ergo_chain_types::BlockId;
 use ergo_chain_types::PeerAddr;
 use ergo_nipopow::NipopowProof;
-use reqwest::Request;
-use reqwest::Response;
 
 use crate::NodeError;
 
diff --git a/ergo-rest/src/error.rs b/ergo-rest/src/error.rs
index 54e44e911..50313a330 100644
--- a/ergo-rest/src/error.rs
+++ b/ergo-rest/src/error.rs
@@ -1,3 +1,4 @@
+use crate::reqwest;
 use thiserror::Error;
 
 /// Possible errors during the communication with node
diff --git a/ergo-rest/src/lib.rs b/ergo-rest/src/lib.rs
index abbd5d066..17af29259 100644
--- a/ergo-rest/src/lib.rs
+++ b/ergo-rest/src/lib.rs
@@ -1,7 +1,10 @@
 //! Ergo node REST API
 
 // Coding conventions
-#![forbid(unsafe_code)]
+
+// Note that we need to allow unsafe code since we are vendoring 2 crates (`wasm-timer` and
+// `reqwest-wrap`) directly as sub-modules in this crate.
+//#![forbid(unsafe_code)]
 #![deny(non_upper_case_globals)]
 #![deny(non_camel_case_types)]
 #![deny(non_snake_case)]
@@ -25,8 +28,10 @@ mod node_conf;
 mod node_info;
 mod node_response;
 mod peer_info;
+mod wasm_timer;
 
 pub mod api;
+pub mod reqwest;
 
 pub use error::*;
 pub use known_nodes::KnownNodes;
diff --git a/ergo-rest/src/node_conf.rs b/ergo-rest/src/node_conf.rs
index c5ff67923..8fa34b7c0 100644
--- a/ergo-rest/src/node_conf.rs
+++ b/ergo-rest/src/node_conf.rs
@@ -1,7 +1,7 @@
 use std::time::Duration;
 
+use crate::reqwest::header::HeaderValue;
 use ergo_chain_types::PeerAddr;
-use reqwest::header::HeaderValue;
 
 /// Ergo node configuration
 #[derive(PartialEq, Eq, Debug, Clone, Copy)]
diff --git a/vendored-deps/reqwest-wrap/src/lib.rs b/ergo-rest/src/reqwest.rs
similarity index 93%
rename from vendored-deps/reqwest-wrap/src/lib.rs
rename to ergo-rest/src/reqwest.rs
index edeb7a341..7061bdf0a 100644
--- a/vendored-deps/reqwest-wrap/src/lib.rs
+++ b/ergo-rest/src/reqwest.rs
@@ -1,3 +1,5 @@
+//! Thin wrapper around `reqwest` crate for WASM
+
 macro_rules! if_wasm {
     ($($item:item)*) => {$(
         #[cfg(target_arch = "wasm32")]
@@ -62,7 +64,7 @@ if_wasm! {
     /// - supplied `Url` cannot be parsed
     /// - there was an error while sending request
     /// - redirect limit was exhausted
-    pub async fn get<T: IntoUrl>(url: T) -> crate::Result<Response> {
+    pub async fn get<T: IntoUrl>(url: T) -> crate::reqwest::Result<Response> {
         Client::builder().build()?.get(url).send().await
     }
 }
diff --git a/vendored-deps/reqwest-wrap/LICENSE-APACHE b/ergo-rest/src/reqwest/LICENSE-APACHE
similarity index 100%
rename from vendored-deps/reqwest-wrap/LICENSE-APACHE
rename to ergo-rest/src/reqwest/LICENSE-APACHE
diff --git a/vendored-deps/reqwest-wrap/LICENSE-MIT b/ergo-rest/src/reqwest/LICENSE-MIT
similarity index 100%
rename from vendored-deps/reqwest-wrap/LICENSE-MIT
rename to ergo-rest/src/reqwest/LICENSE-MIT
diff --git a/vendored-deps/reqwest-wrap/src/error.rs b/ergo-rest/src/reqwest/error.rs
similarity index 98%
rename from vendored-deps/reqwest-wrap/src/error.rs
rename to ergo-rest/src/reqwest/error.rs
index 45a5c063c..dd9144aaa 100644
--- a/vendored-deps/reqwest-wrap/src/error.rs
+++ b/ergo-rest/src/reqwest/error.rs
@@ -3,7 +3,7 @@ use std::error::Error as StdError;
 use std::fmt;
 use std::io;
 
-use crate::{StatusCode, Url};
+use crate::reqwest::{StatusCode, Url};
 
 /// A `Result` alias where the `Err` case is `reqwest::Error`.
 pub type Result<T> = std::result::Result<T, Error>;
@@ -215,14 +215,14 @@ impl StdError for Error {
 }
 
 #[cfg(target_arch = "wasm32")]
-impl From<crate::error::Error> for wasm_bindgen::JsValue {
+impl From<crate::reqwest::error::Error> for wasm_bindgen::JsValue {
     fn from(err: Error) -> wasm_bindgen::JsValue {
         js_sys::Error::from(err).into()
     }
 }
 
 #[cfg(target_arch = "wasm32")]
-impl From<crate::error::Error> for js_sys::Error {
+impl From<crate::reqwest::error::Error> for js_sys::Error {
     fn from(err: Error) -> js_sys::Error {
         js_sys::Error::new(&format!("{}", err))
     }
diff --git a/vendored-deps/reqwest-wrap/src/into_url.rs b/ergo-rest/src/reqwest/into_url.rs
similarity index 78%
rename from vendored-deps/reqwest-wrap/src/into_url.rs
rename to ergo-rest/src/reqwest/into_url.rs
index ef0db9495..19e4463cf 100644
--- a/vendored-deps/reqwest-wrap/src/into_url.rs
+++ b/ergo-rest/src/reqwest/into_url.rs
@@ -14,17 +14,17 @@ impl<'a> IntoUrl for &'a String {}
 pub trait IntoUrlSealed {
     // Besides parsing as a valid `Url`, the `Url` must be a valid
     // `http::Uri`, in that it makes sense to use in a network request.
-    fn into_url(self) -> crate::Result<Url>;
+    fn into_url(self) -> crate::reqwest::Result<Url>;
 
     fn as_str(&self) -> &str;
 }
 
 impl IntoUrlSealed for Url {
-    fn into_url(self) -> crate::Result<Url> {
+    fn into_url(self) -> crate::reqwest::Result<Url> {
         if self.has_host() {
             Ok(self)
         } else {
-            Err(crate::error::url_bad_scheme(self))
+            Err(crate::reqwest::error::url_bad_scheme(self))
         }
     }
 
@@ -34,8 +34,10 @@ impl IntoUrlSealed for Url {
 }
 
 impl<'a> IntoUrlSealed for &'a str {
-    fn into_url(self) -> crate::Result<Url> {
-        Url::parse(self).map_err(crate::error::builder)?.into_url()
+    fn into_url(self) -> crate::reqwest::Result<Url> {
+        Url::parse(self)
+            .map_err(crate::reqwest::error::builder)?
+            .into_url()
     }
 
     fn as_str(&self) -> &str {
@@ -44,7 +46,7 @@ impl<'a> IntoUrlSealed for &'a str {
 }
 
 impl<'a> IntoUrlSealed for &'a String {
-    fn into_url(self) -> crate::Result<Url> {
+    fn into_url(self) -> crate::reqwest::Result<Url> {
         (&**self).into_url()
     }
 
@@ -54,7 +56,7 @@ impl<'a> IntoUrlSealed for &'a String {
 }
 
 impl<'a> IntoUrlSealed for String {
-    fn into_url(self) -> crate::Result<Url> {
+    fn into_url(self) -> crate::reqwest::Result<Url> {
         (&*self).into_url()
     }
 
diff --git a/vendored-deps/reqwest-wrap/src/response.rs b/ergo-rest/src/reqwest/response.rs
similarity index 100%
rename from vendored-deps/reqwest-wrap/src/response.rs
rename to ergo-rest/src/reqwest/response.rs
diff --git a/vendored-deps/reqwest-wrap/src/util.rs b/ergo-rest/src/reqwest/util.rs
similarity index 94%
rename from vendored-deps/reqwest-wrap/src/util.rs
rename to ergo-rest/src/reqwest/util.rs
index b76a211d4..09e9fd308 100644
--- a/vendored-deps/reqwest-wrap/src/util.rs
+++ b/ergo-rest/src/reqwest/util.rs
@@ -1,4 +1,4 @@
-use crate::header::{Entry, HeaderMap, OccupiedEntry};
+use crate::reqwest::header::{Entry, HeaderMap, OccupiedEntry};
 
 pub(crate) fn replace_headers(dst: &mut HeaderMap, src: HeaderMap) {
     // IntoIter of HeaderMap yields (Option<HeaderName>, HeaderValue).
diff --git a/vendored-deps/reqwest-wrap/src/wasm/body.rs b/ergo-rest/src/reqwest/wasm/body.rs
similarity index 98%
rename from vendored-deps/reqwest-wrap/src/wasm/body.rs
rename to ergo-rest/src/reqwest/wasm/body.rs
index 9e925e9c5..faf5d77f2 100644
--- a/vendored-deps/reqwest-wrap/src/wasm/body.rs
+++ b/ergo-rest/src/reqwest/wasm/body.rs
@@ -42,7 +42,7 @@ impl Body {
             Inner::MultipartPart(bytes) => Some(bytes.as_ref()),
         }
     }
-    pub(crate) fn to_js_value(&self) -> crate::Result<JsValue> {
+    pub(crate) fn to_js_value(&self) -> crate::reqwest::Result<JsValue> {
         match &self.inner {
             Inner::Bytes(body_bytes) => {
                 let body_bytes: &[u8] = body_bytes.as_ref();
@@ -168,7 +168,7 @@ impl fmt::Debug for Body {
 
 #[cfg(test)]
 mod tests {
-    use crate::Body;
+    use crate::reqwest::Body;
     use js_sys::Uint8Array;
     use wasm_bindgen::prelude::*;
     use wasm_bindgen_test::*;
diff --git a/vendored-deps/reqwest-wrap/src/wasm/client.rs b/ergo-rest/src/reqwest/wasm/client.rs
similarity index 92%
rename from vendored-deps/reqwest-wrap/src/wasm/client.rs
rename to ergo-rest/src/reqwest/wasm/client.rs
index ca1454c80..017f34f65 100644
--- a/vendored-deps/reqwest-wrap/src/wasm/client.rs
+++ b/ergo-rest/src/reqwest/wasm/client.rs
@@ -9,7 +9,7 @@ use wasm_bindgen::prelude::{wasm_bindgen, Closure, UnwrapThrowExt as _};
 use wasm_bindgen::JsCast;
 
 use super::{Request, RequestBuilder, Response};
-use crate::IntoUrl;
+use crate::reqwest::IntoUrl;
 
 #[wasm_bindgen]
 extern "C" {
@@ -146,7 +146,7 @@ impl Client {
     pub fn execute(
         &self,
         request: Request,
-    ) -> impl Future<Output = Result<Response, crate::Error>> {
+    ) -> impl Future<Output = Result<Response, crate::reqwest::Error>> {
         self.execute_request(request)
     }
 
@@ -166,7 +166,7 @@ impl Client {
     pub(super) fn execute_request(
         &self,
         mut req: Request,
-    ) -> impl Future<Output = crate::Result<Response>> {
+    ) -> impl Future<Output = crate::reqwest::Result<Response>> {
         self.merge_headers(&mut req);
         fetch(req)
     }
@@ -194,7 +194,7 @@ impl fmt::Debug for ClientBuilder {
     }
 }
 
-async fn fetch(req: Request) -> crate::Result<Response> {
+async fn fetch(req: Request) -> crate::reqwest::Result<Response> {
     // Build the js Request
     let mut init = web_sys::RequestInit::new();
     let abort_controller = Rc::new(web_sys::AbortController::new().unwrap());
@@ -204,17 +204,17 @@ async fn fetch(req: Request) -> crate::Result<Response> {
 
     // convert HeaderMap to Headers
     let js_headers = web_sys::Headers::new()
-        .map_err(crate::error::wasm)
-        .map_err(crate::error::builder)?;
+        .map_err(crate::reqwest::error::wasm)
+        .map_err(crate::reqwest::error::builder)?;
 
     for (name, value) in req.headers() {
         js_headers
             .append(
                 name.as_str(),
-                value.to_str().map_err(crate::error::builder)?,
+                value.to_str().map_err(crate::reqwest::error::builder)?,
             )
-            .map_err(crate::error::wasm)
-            .map_err(crate::error::builder)?;
+            .map_err(crate::reqwest::error::wasm)
+            .map_err(crate::reqwest::error::builder)?;
     }
     init.headers(&js_headers.into());
 
@@ -251,14 +251,14 @@ async fn fetch(req: Request) -> crate::Result<Response> {
     }
 
     let js_req = web_sys::Request::new_with_str_and_init(req.url().as_str(), &init)
-        .map_err(crate::error::wasm)
-        .map_err(crate::error::builder)?;
+        .map_err(crate::reqwest::error::wasm)
+        .map_err(crate::reqwest::error::builder)?;
 
     // Await the fetch() promise
     let p = js_fetch(&js_req);
     let js_resp = super::promise::<web_sys::Response>(p)
         .await
-        .map_err(crate::error::request)?;
+        .map_err(crate::reqwest::error::request)?;
 
     // Convert from the js Response
     let mut resp = http::Response::builder().status(js_resp.status());
@@ -282,7 +282,7 @@ async fn fetch(req: Request) -> crate::Result<Response> {
 
     resp.body(js_resp)
         .map(|resp| Response::new(resp, url))
-        .map_err(crate::error::request)
+        .map_err(crate::reqwest::error::request)
 }
 
 // ===== impl ClientBuilder =====
@@ -297,7 +297,7 @@ impl ClientBuilder {
     }
 
     /// Returns a 'Client' that uses this ClientBuilder configuration
-    pub fn build(mut self) -> Result<Client, crate::Error> {
+    pub fn build(mut self) -> Result<Client, crate::reqwest::Error> {
         let config = std::mem::take(&mut self.config);
         Ok(Client {
             config: Arc::new(config),
@@ -355,7 +355,7 @@ mod tests {
 
     #[wasm_bindgen_test]
     async fn default_headers() {
-        use crate::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
+        use crate::reqwest::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
 
         let mut headers = HeaderMap::new();
         headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
@@ -379,7 +379,7 @@ mod tests {
 
     #[wasm_bindgen_test]
     async fn default_headers_clone() {
-        use crate::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
+        use crate::reqwest::header::{HeaderMap, HeaderValue, CONTENT_TYPE};
 
         let mut headers = HeaderMap::new();
         headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
diff --git a/vendored-deps/reqwest-wrap/src/wasm/mod.rs b/ergo-rest/src/reqwest/wasm/mod.rs
similarity index 82%
rename from vendored-deps/reqwest-wrap/src/wasm/mod.rs
rename to ergo-rest/src/reqwest/wasm/mod.rs
index 249b4a284..ea9a045d4 100644
--- a/vendored-deps/reqwest-wrap/src/wasm/mod.rs
+++ b/ergo-rest/src/reqwest/wasm/mod.rs
@@ -13,13 +13,13 @@ pub use self::client::{Client, ClientBuilder};
 pub use self::request::{Request, RequestBuilder};
 pub use self::response::Response;
 
-async fn promise<T>(promise: js_sys::Promise) -> Result<T, crate::error::BoxError>
+async fn promise<T>(promise: js_sys::Promise) -> Result<T, crate::reqwest::error::BoxError>
 where
     T: JsCast,
 {
     use wasm_bindgen_futures::JsFuture;
 
-    let js_val = JsFuture::from(promise).await.map_err(crate::error::wasm)?;
+    let js_val = JsFuture::from(promise).await.map_err(crate::reqwest::error::wasm)?;
 
     js_val
         .dyn_into::<T>()
diff --git a/vendored-deps/reqwest-wrap/src/wasm/multipart.rs b/ergo-rest/src/reqwest/wasm/multipart.rs
similarity index 100%
rename from vendored-deps/reqwest-wrap/src/wasm/multipart.rs
rename to ergo-rest/src/reqwest/wasm/multipart.rs
diff --git a/vendored-deps/reqwest-wrap/src/wasm/request.rs b/ergo-rest/src/reqwest/wasm/request.rs
similarity index 90%
rename from vendored-deps/reqwest-wrap/src/wasm/request.rs
rename to ergo-rest/src/reqwest/wasm/request.rs
index a1c1d6e10..f467b36ce 100644
--- a/vendored-deps/reqwest-wrap/src/wasm/request.rs
+++ b/ergo-rest/src/reqwest/wasm/request.rs
@@ -11,7 +11,7 @@ use url::Url;
 use web_sys::RequestCredentials;
 
 use super::{Body, Client, Response};
-use crate::header::{HeaderMap, HeaderName, HeaderValue, CONTENT_TYPE};
+use crate::reqwest::header::{HeaderMap, HeaderName, HeaderValue, CONTENT_TYPE};
 
 /// A request which can be executed with `Client::execute()`.
 pub struct Request {
@@ -27,7 +27,7 @@ pub struct Request {
 /// A builder to construct the properties of a `Request`.
 pub struct RequestBuilder {
     client: Client,
-    request: crate::Result<Request>,
+    request: crate::reqwest::Result<Request>,
 }
 
 impl Request {
@@ -127,7 +127,7 @@ impl Request {
 }
 
 impl RequestBuilder {
-    pub(super) fn new(client: Client, request: crate::Result<Request>) -> RequestBuilder {
+    pub(super) fn new(client: Client, request: crate::reqwest::Result<Request>) -> RequestBuilder {
         RequestBuilder { client, request }
     }
 
@@ -157,7 +157,7 @@ impl RequestBuilder {
             let serializer = serde_urlencoded::Serializer::new(&mut pairs);
 
             if let Err(err) = query.serialize(serializer) {
-                error = Some(crate::error::builder(err));
+                error = Some(crate::reqwest::error::builder(err));
             }
         }
         if let Ok(ref mut req) = self.request {
@@ -192,7 +192,7 @@ impl RequestBuilder {
                     );
                     *req.body_mut() = Some(body.into());
                 }
-                Err(err) => error = Some(crate::error::builder(err)),
+                Err(err) => error = Some(crate::reqwest::error::builder(err)),
             }
         }
         if let Some(err) = error {
@@ -213,7 +213,7 @@ impl RequestBuilder {
                         .insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
                     *req.body_mut() = Some(body.into());
                 }
-                Err(err) => error = Some(crate::error::builder(err)),
+                Err(err) => error = Some(crate::reqwest::error::builder(err)),
             }
         }
         if let Some(err) = error {
@@ -228,7 +228,7 @@ impl RequestBuilder {
         T: fmt::Display,
     {
         let header_value = format!("Bearer {}", token);
-        self.header(crate::header::AUTHORIZATION, header_value)
+        self.header(crate::reqwest::header::AUTHORIZATION, header_value)
     }
 
     /// Enables a request timeout.
@@ -276,9 +276,9 @@ impl RequestBuilder {
                     Ok(value) => {
                         req.headers_mut().append(key, value);
                     }
-                    Err(e) => error = Some(crate::error::builder(e.into())),
+                    Err(e) => error = Some(crate::reqwest::error::builder(e.into())),
                 },
-                Err(e) => error = Some(crate::error::builder(e.into())),
+                Err(e) => error = Some(crate::reqwest::error::builder(e.into())),
             };
         }
         if let Some(err) = error {
@@ -290,9 +290,9 @@ impl RequestBuilder {
     /// Add a set of Headers to the existing ones on this Request.
     ///
     /// The headers will be merged in to any already set.
-    pub fn headers(mut self, headers: crate::header::HeaderMap) -> RequestBuilder {
+    pub fn headers(mut self, headers: crate::reqwest::header::HeaderMap) -> RequestBuilder {
         if let Ok(ref mut req) = self.request {
-            crate::util::replace_headers(req.headers_mut(), headers);
+            crate::reqwest::util::replace_headers(req.headers_mut(), headers);
         }
         self
     }
@@ -363,7 +363,7 @@ impl RequestBuilder {
 
     /// Build a `Request`, which can be inspected, modified and executed with
     /// `Client::execute()`.
-    pub fn build(self) -> crate::Result<Request> {
+    pub fn build(self) -> crate::reqwest::Result<Request> {
         self.request
     }
 
@@ -387,7 +387,7 @@ impl RequestBuilder {
     /// # Ok(())
     /// # }
     /// ```
-    pub async fn send(self) -> crate::Result<Response> {
+    pub async fn send(self) -> crate::reqwest::Result<Response> {
         let req = self.request?;
         self.client.execute_request(req).await
     }
@@ -451,9 +451,9 @@ impl<T> TryFrom<HttpRequest<T>> for Request
 where
     T: Into<Body>,
 {
-    type Error = crate::Error;
+    type Error = crate::reqwest::Error;
 
-    fn try_from(req: HttpRequest<T>) -> crate::Result<Self> {
+    fn try_from(req: HttpRequest<T>) -> crate::reqwest::Result<Self> {
         let (parts, body) = req.into_parts();
         let Parts {
             method,
@@ -461,7 +461,7 @@ where
             headers,
             ..
         } = parts;
-        let url = Url::parse(&uri.to_string()).map_err(crate::error::builder)?;
+        let url = Url::parse(&uri.to_string()).map_err(crate::reqwest::error::builder)?;
         Ok(Request {
             method,
             url,
@@ -475,9 +475,9 @@ where
 }
 
 impl TryFrom<Request> for HttpRequest<Body> {
-    type Error = crate::Error;
+    type Error = crate::reqwest::Error;
 
-    fn try_from(req: Request) -> crate::Result<Self> {
+    fn try_from(req: Request) -> crate::reqwest::Result<Self> {
         let Request {
             method,
             url,
@@ -490,7 +490,7 @@ impl TryFrom<Request> for HttpRequest<Body> {
             .method(method)
             .uri(url.as_str())
             .body(body.unwrap_or_else(|| Body::from(Bytes::default())))
-            .map_err(crate::error::builder)?;
+            .map_err(crate::reqwest::error::builder)?;
 
         *req.headers_mut() = headers;
         Ok(req)
diff --git a/vendored-deps/reqwest-wrap/src/wasm/response.rs b/ergo-rest/src/reqwest/wasm/response.rs
similarity index 78%
rename from vendored-deps/reqwest-wrap/src/wasm/response.rs
rename to ergo-rest/src/reqwest/wasm/response.rs
index 44041e274..f5b8c4015 100644
--- a/vendored-deps/reqwest-wrap/src/wasm/response.rs
+++ b/ergo-rest/src/reqwest/wasm/response.rs
@@ -75,42 +75,42 @@ impl Response {
     /// Try to deserialize the response body as JSON.
     #[cfg(feature = "json")]
     #[cfg_attr(docsrs, doc(cfg(feature = "json")))]
-    pub async fn json<T: DeserializeOwned>(self) -> crate::Result<T> {
+    pub async fn json<T: DeserializeOwned>(self) -> crate::reqwest::Result<T> {
         let full = self.bytes().await?;
 
-        serde_json::from_slice(&full).map_err(crate::error::decode)
+        serde_json::from_slice(&full).map_err(crate::reqwest::error::decode)
     }
 
     /// Get the response text.
-    pub async fn text(self) -> crate::Result<String> {
+    pub async fn text(self) -> crate::reqwest::Result<String> {
         let p = self
             .http
             .body()
             .text()
-            .map_err(crate::error::wasm)
-            .map_err(crate::error::decode)?;
+            .map_err(crate::reqwest::error::wasm)
+            .map_err(crate::reqwest::error::decode)?;
         let js_val = super::promise::<wasm_bindgen::JsValue>(p)
             .await
-            .map_err(crate::error::decode)?;
+            .map_err(crate::reqwest::error::decode)?;
         if let Some(s) = js_val.as_string() {
             Ok(s)
         } else {
-            Err(crate::error::decode("response.text isn't string"))
+            Err(crate::reqwest::error::decode("response.text isn't string"))
         }
     }
 
     /// Get the response as bytes
-    pub async fn bytes(self) -> crate::Result<Bytes> {
+    pub async fn bytes(self) -> crate::reqwest::Result<Bytes> {
         let p = self
             .http
             .body()
             .array_buffer()
-            .map_err(crate::error::wasm)
-            .map_err(crate::error::decode)?;
+            .map_err(crate::reqwest::error::wasm)
+            .map_err(crate::reqwest::error::decode)?;
 
         let buf_js = super::promise::<wasm_bindgen::JsValue>(p)
             .await
-            .map_err(crate::error::decode)?;
+            .map_err(crate::reqwest::error::decode)?;
 
         let buffer = Uint8Array::new(&buf_js);
         let mut bytes = vec![0; buffer.length() as usize];
@@ -121,20 +121,20 @@ impl Response {
     // util methods
 
     /// Turn a response into an error if the server returned an error.
-    pub fn error_for_status(self) -> crate::Result<Self> {
+    pub fn error_for_status(self) -> crate::reqwest::Result<Self> {
         let status = self.status();
         if status.is_client_error() || status.is_server_error() {
-            Err(crate::error::status_code(*self.url, status))
+            Err(crate::reqwest::error::status_code(*self.url, status))
         } else {
             Ok(self)
         }
     }
 
     /// Turn a reference to a response into an error if the server returned an error.
-    pub fn error_for_status_ref(&self) -> crate::Result<&Self> {
+    pub fn error_for_status_ref(&self) -> crate::reqwest::Result<&Self> {
         let status = self.status();
         if status.is_client_error() || status.is_server_error() {
-            Err(crate::error::status_code(*self.url.clone(), status))
+            Err(crate::reqwest::error::status_code(*self.url.clone(), status))
         } else {
             Ok(self)
         }
diff --git a/vendored-deps/wasm-timer/src/lib.rs b/ergo-rest/src/wasm_timer.rs
similarity index 100%
rename from vendored-deps/wasm-timer/src/lib.rs
rename to ergo-rest/src/wasm_timer.rs
diff --git a/vendored-deps/wasm-timer/LICENSE b/ergo-rest/src/wasm_timer/LICENSE
similarity index 100%
rename from vendored-deps/wasm-timer/LICENSE
rename to ergo-rest/src/wasm_timer/LICENSE
diff --git a/vendored-deps/wasm-timer/src/timer.rs b/ergo-rest/src/wasm_timer/timer.rs
similarity index 98%
rename from vendored-deps/wasm-timer/src/timer.rs
rename to ergo-rest/src/wasm_timer/timer.rs
index 32a64df5c..c089a3c90 100644
--- a/vendored-deps/wasm-timer/src/timer.rs
+++ b/ergo-rest/src/wasm_timer/timer.rs
@@ -229,7 +229,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-use crate::Instant;
+use crate::wasm_timer::Instant;
 use std::cmp::Ordering;
 use std::fmt;
 use std::mem;
@@ -373,8 +373,14 @@ impl Timer {
 
             // Flag the timer as fired and then notify its task, if any, that's
             // blocked.
-            let heap_timer = self.timer_heap.pop().unwrap();
-            *heap_timer.node.slot.lock().unwrap() = None;
+            let heap_timer = {
+                #[allow(clippy::unwrap_used)]
+                self.timer_heap.pop().unwrap()
+            };
+            #[allow(clippy::unwrap_used)]
+            {
+                *heap_timer.node.slot.lock().unwrap() = None;
+            }
             let bits = heap_timer.gen << 2;
             match heap_timer
                 .node
@@ -394,6 +400,7 @@ impl Timer {
         // In theory we could update it in place and then do the percolation
         // as necessary
         let gen = node.state.load(SeqCst) >> 2;
+        #[allow(clippy::unwrap_used)]
         let mut slot = node.slot.lock().unwrap();
         if let Some(heap_slot) = slot.take() {
             self.timer_heap.remove(heap_slot);
@@ -408,6 +415,7 @@ impl Timer {
     fn remove(&mut self, node: Arc<Node<ScheduledTimer>>) {
         // If this `idx` is still around and it's still got a registered timer,
         // then we jettison it form the timer heap.
+        #[allow(clippy::unwrap_used)]
         let mut slot = node.slot.lock().unwrap();
         let heap_slot = match slot.take() {
             Some(slot) => slot,
@@ -429,6 +437,7 @@ impl Future for Timer {
         Pin::new(&mut self.inner).waker.register(cx.waker());
         let mut list = self.inner.list.take();
         while let Some(node) = list.pop() {
+            #[allow(clippy::unwrap_used)]
             let at = *node.at.lock().unwrap();
             match at {
                 Some(at) => self.update_or_add(at, node),
diff --git a/vendored-deps/wasm-timer/src/timer/arc_list.rs b/ergo-rest/src/wasm_timer/timer/arc_list.rs
similarity index 99%
rename from vendored-deps/wasm-timer/src/timer/arc_list.rs
rename to ergo-rest/src/wasm_timer/timer/arc_list.rs
index 43880523d..0b51b9e5d 100644
--- a/vendored-deps/wasm-timer/src/timer/arc_list.rs
+++ b/ergo-rest/src/wasm_timer/timer/arc_list.rs
@@ -127,6 +127,7 @@ impl<T> Deref for Node<T> {
 }
 
 #[cfg(test)]
+#[allow(clippy::unwrap_used)]
 mod tests {
     use super::*;
 
diff --git a/vendored-deps/wasm-timer/src/timer/delay.rs b/ergo-rest/src/wasm_timer/timer/delay.rs
similarity index 95%
rename from vendored-deps/wasm-timer/src/timer/delay.rs
rename to ergo-rest/src/wasm_timer/timer/delay.rs
index 23f630745..6a6342143 100644
--- a/vendored-deps/wasm-timer/src/timer/delay.rs
+++ b/ergo-rest/src/wasm_timer/timer/delay.rs
@@ -15,9 +15,9 @@ use std::time::Duration;
 
 use futures::task::AtomicWaker;
 
-use crate::timer::arc_list::Node;
-use crate::timer::{ScheduledTimer, TimerHandle};
-use crate::Instant;
+use super::arc_list::Node;
+use super::Instant;
+use super::{ScheduledTimer, TimerHandle};
 
 /// A future representing the notification that an elapsed duration has
 /// occurred.
@@ -138,7 +138,10 @@ impl Delay {
                     Err(s) => bits = s,
                 }
             }
-            *state.at.lock().unwrap() = Some(at);
+            #[allow(clippy::unwrap_used)]
+            {
+                *state.at.lock().unwrap() = Some(at);
+            }
             // If we fail to push our node then we've become an inert timer, so
             // we'll want to clear our `state` field accordingly
             timeouts.list.push(state)?;
@@ -193,7 +196,10 @@ impl Drop for Delay {
             None => return,
         };
         if let Some(timeouts) = state.inner.upgrade() {
-            *state.at.lock().unwrap() = None;
+            #[allow(clippy::unwrap_used)]
+            {
+                *state.at.lock().unwrap() = None;
+            }
             if timeouts.list.push(state).is_ok() {
                 timeouts.waker.wake();
             }
diff --git a/vendored-deps/wasm-timer/src/timer/ext.rs b/ergo-rest/src/wasm_timer/timer/ext.rs
similarity index 86%
rename from vendored-deps/wasm-timer/src/timer/ext.rs
rename to ergo-rest/src/wasm_timer/timer/ext.rs
index 41124c846..86c8cbd39 100644
--- a/vendored-deps/wasm-timer/src/timer/ext.rs
+++ b/ergo-rest/src/wasm_timer/timer/ext.rs
@@ -8,7 +8,7 @@ use std::time::Duration;
 use futures::prelude::*;
 use pin_utils::unsafe_pinned;
 
-use crate::{Delay, Instant};
+use super::{delay::Delay, Instant};
 
 /// An extension trait for futures which provides convenient accessors for
 /// timing out execution and such.
@@ -23,30 +23,6 @@ pub trait TryFutureExt: TryFuture + Sized {
     /// If the future completes before `dur` elapses then the future will
     /// resolve with that item. Otherwise the future will resolve to an error
     /// once `dur` has elapsed.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// use std::time::Duration;
-    /// use futures::prelude::*;
-    /// use wasm_timer::TryFutureExt;
-    ///
-    /// # fn long_future() -> impl TryFuture<Ok = (), Error = std::io::Error> {
-    /// #     futures::future::ok(())
-    /// # }
-    /// #
-    /// fn main() {
-    ///     let future = long_future();
-    ///     let timed_out = future.timeout(Duration::from_secs(1));
-    ///
-    ///     async_std::task::block_on(async {
-    ///         match timed_out.await {
-    ///             Ok(item) => println!("got {:?} within enough time!", item),
-    ///             Err(_) => println!("took too long to produce the item"),
-    ///         }
-    ///     })
-    /// }
-    /// ```
     fn timeout(self, dur: Duration) -> Timeout<Self>
     where
         Self::Error: From<io::Error>,
diff --git a/vendored-deps/wasm-timer/src/timer/global.rs b/ergo-rest/src/wasm_timer/timer/global.rs
similarity index 100%
rename from vendored-deps/wasm-timer/src/timer/global.rs
rename to ergo-rest/src/wasm_timer/timer/global.rs
diff --git a/vendored-deps/wasm-timer/src/timer/global/desktop.rs b/ergo-rest/src/wasm_timer/timer/global/desktop.rs
similarity index 98%
rename from vendored-deps/wasm-timer/src/timer/global/desktop.rs
rename to ergo-rest/src/wasm_timer/timer/global/desktop.rs
index 072daac74..8630bbe44 100644
--- a/vendored-deps/wasm-timer/src/timer/global/desktop.rs
+++ b/ergo-rest/src/wasm_timer/timer/global/desktop.rs
@@ -10,7 +10,7 @@ use std::time::Instant;
 
 use pin_utils::pin_mut;
 
-use crate::{Timer, TimerHandle};
+use crate::wasm_timer::{Timer, TimerHandle};
 
 pub struct HelperThread {
     thread: Option<thread::JoinHandle<()>>,
diff --git a/vendored-deps/wasm-timer/src/timer/global/wasm.rs b/ergo-rest/src/wasm_timer/timer/global/wasm.rs
similarity index 96%
rename from vendored-deps/wasm-timer/src/timer/global/wasm.rs
rename to ergo-rest/src/wasm_timer/timer/global/wasm.rs
index 7d75b31f1..051043d8c 100644
--- a/vendored-deps/wasm-timer/src/timer/global/wasm.rs
+++ b/ergo-rest/src/wasm_timer/timer/global/wasm.rs
@@ -8,7 +8,10 @@ use std::task::Context;
 use std::time::Duration;
 use wasm_bindgen::{closure::Closure, JsCast};
 
-use crate::{Instant, Timer, TimerHandle};
+use crate::wasm_timer::{
+    timer::{Timer, TimerHandle},
+    wasm::Instant,
+};
 
 /// Starts a background task, creates a `Timer`, and returns a handle to it.
 ///
@@ -26,6 +29,7 @@ pub(crate) fn run() -> TimerHandle {
 /// processes everything.
 fn schedule_callback(timer: Arc<Mutex<Timer>>, when: Duration) {
     let window = web_sys::window().expect("Unable to access Window");
+    #[allow(clippy::unwrap_used)]
     let _ = window
         .set_timeout_with_callback_and_timeout_and_arguments_0(
             &Closure::once_into_js(move || {
diff --git a/vendored-deps/wasm-timer/src/timer/heap.rs b/ergo-rest/src/wasm_timer/timer/heap.rs
similarity index 96%
rename from vendored-deps/wasm-timer/src/timer/heap.rs
rename to ergo-rest/src/wasm_timer/timer/heap.rs
index f0f988229..36ee7ae82 100644
--- a/vendored-deps/wasm-timer/src/timer/heap.rs
+++ b/ergo-rest/src/wasm_timer/timer/heap.rs
@@ -44,6 +44,7 @@ impl<T: Ord> Heap<T> {
     ///
     /// The slot can later get passed to `remove` to remove the element from the
     /// heap, but only if the element was previously not removed from the heap.
+    #[allow(clippy::panic)]
     pub fn push(&mut self, t: T) -> Slot {
         self.assert_consistent();
         let len = self.items.len();
@@ -80,6 +81,7 @@ impl<T: Ord> Heap<T> {
         Some(self.remove(slot))
     }
 
+    #[allow(clippy::panic)]
     pub fn remove(&mut self, slot: Slot) -> T {
         self.assert_consistent();
         let empty = SlabSlot::Empty {
@@ -119,6 +121,7 @@ impl<T: Ord> Heap<T> {
         return idx;
     }
 
+    #[allow(clippy::panic)]
     fn percolate_down(&mut self, mut idx: usize) -> usize {
         loop {
             let left = 2 * idx + 1;
@@ -144,7 +147,9 @@ impl<T: Ord> Heap<T> {
                 }
 
                 (None, None) => break,
-                (None, Some(_right)) => panic!("not possible"),
+                (None, Some(_right)) => {
+                    panic!("not possible")
+                }
             }
 
             let (a, b) = if swap_left {
@@ -160,6 +165,7 @@ impl<T: Ord> Heap<T> {
         return idx;
     }
 
+    #[allow(clippy::panic)]
     fn assert_consistent(&self) {
         if !cfg!(assert_timer_heap_consistent) {
             return;
@@ -181,7 +187,9 @@ impl<T: Ord> Heap<T> {
         for (i, &(_, j)) in self.items.iter().enumerate() {
             let index = match self.index[j] {
                 SlabSlot::Full { value } => value,
-                SlabSlot::Empty { .. } => panic!(),
+                SlabSlot::Empty { .. } => {
+                    panic!()
+                }
             };
             if index != i {
                 panic!(
@@ -205,6 +213,7 @@ impl<T: Ord> Heap<T> {
     }
 }
 
+#[allow(clippy::panic)]
 fn set_index<T>(slab: &mut Vec<SlabSlot<T>>, slab_slot: usize, val: T) {
     match slab[slab_slot] {
         SlabSlot::Full { ref mut value } => *value = val,
@@ -213,6 +222,7 @@ fn set_index<T>(slab: &mut Vec<SlabSlot<T>>, slab_slot: usize, val: T) {
 }
 
 #[cfg(test)]
+#[allow(clippy::unwrap_used)]
 mod tests {
     use super::Heap;
 
diff --git a/vendored-deps/wasm-timer/src/timer/interval.rs b/ergo-rest/src/wasm_timer/timer/interval.rs
similarity index 97%
rename from vendored-deps/wasm-timer/src/timer/interval.rs
rename to ergo-rest/src/wasm_timer/timer/interval.rs
index de201a1a0..8e389819f 100644
--- a/vendored-deps/wasm-timer/src/timer/interval.rs
+++ b/ergo-rest/src/wasm_timer/timer/interval.rs
@@ -5,8 +5,8 @@ use std::time::Duration;
 
 use futures::prelude::*;
 
-use crate::timer::delay;
-use crate::{Delay, Instant, TimerHandle};
+use super::delay;
+use super::{Delay, Instant, TimerHandle};
 
 /// A stream representing notifications at fixed interval
 ///
@@ -91,8 +91,10 @@ fn next_interval(prev: Instant, now: Instant, interval: Duration) -> Instant {
     if new > now {
         return new;
     } else {
+        #[allow(clippy::expect_used)]
         let spent_ns =
             duration_to_nanos(now.duration_since(prev)).expect("interval should be expired");
+        #[allow(clippy::expect_used)]
         let interval_ns =
             duration_to_nanos(interval).expect("interval is less that 427 thousand years");
         let mult = spent_ns / interval_ns + 1;
diff --git a/vendored-deps/wasm-timer/src/wasm.rs b/ergo-rest/src/wasm_timer/wasm.rs
similarity index 98%
rename from vendored-deps/wasm-timer/src/wasm.rs
rename to ergo-rest/src/wasm_timer/wasm.rs
index 87a88979f..f2981c373 100644
--- a/vendored-deps/wasm-timer/src/wasm.rs
+++ b/ergo-rest/src/wasm_timer/wasm.rs
@@ -48,6 +48,7 @@ impl PartialOrd for Instant {
 }
 
 impl Ord for Instant {
+    #[allow(clippy::unwrap_used)]
     fn cmp(&self, other: &Self) -> Ordering {
         self.inner.partial_cmp(&other.inner).unwrap()
     }
@@ -129,6 +130,7 @@ impl PartialOrd for SystemTime {
 }
 
 impl Ord for SystemTime {
+    #[allow(clippy::unwrap_used)]
     fn cmp(&self, other: &Self) -> Ordering {
         self.inner.partial_cmp(&other.inner).unwrap()
     }
diff --git a/vendored-deps/reqwest-wrap/Cargo.toml b/vendored-deps/reqwest-wrap/Cargo.toml
deleted file mode 100644
index 497b659ce..000000000
--- a/vendored-deps/reqwest-wrap/Cargo.toml
+++ /dev/null
@@ -1,50 +0,0 @@
-[package]
-name = "reqwest-wrap"
-version = "0.11.10"
-edition = "2021"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[features]
-json = ["serde_json"]
-
-[dependencies]
-http = "0.2"
-url = "2.2"
-bytes = "1.0"
-serde = "1.0"
-serde_urlencoded = "0.7.1"
-serde_json = { version = "1.0", optional = true }
-
-[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
-reqwest = { version = "0.11.10", default-features = false, features = ["json"] }
-
-[target.'cfg(target_arch = "wasm32")'.dependencies]
-js-sys = "0.3.45"
-serde_json = "1.0"
-wasm-bindgen = "0.2.68"
-wasm-bindgen-futures = "0.4.18"
-
-
-[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
-version = "0.3.25"
-features = [
-    "Headers",
-    "Request",
-    "RequestInit",
-    "RequestMode",
-    "AbortController",
-    "AbortSignal",
-    "Response",
-    "Window",
-    "FormData",
-    "Blob",
-    "BlobPropertyBag",
-    "ServiceWorkerGlobalScope",
-    "RequestCredentials",
-    "File"
-]
-
-[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-wasm-bindgen = { version = "0.2.68", features = ["serde-serialize"] }
-wasm-bindgen-test = "0.3"
\ No newline at end of file
diff --git a/vendored-deps/reqwest-wrap/README.md b/vendored-deps/reqwest-wrap/README.md
deleted file mode 100644
index ebeb162ab..000000000
--- a/vendored-deps/reqwest-wrap/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-This crate exists as a workaround that gives `reqwest` the ability to have request timeouts for the
-WASM platform (see https://github.com/seanmonstar/reqwest/issues/1135). Currently timeouts are
-only implemented in `reqwest` for non-WASM platforms. However there exists a yet-to-be-merged pull
-request (https://github.com/seanmonstar/reqwest/pull/1274) that implements timeouts under WASM.
-
-This crate vendors the WASM related code of `reqwest` and applies the above mentioned PR on top.
-This allows WASM-based dependendents of this crate to have timeouts for requests. Non-WASM users
-have access to the underlying `reqwest` crate without any modifications.
\ No newline at end of file
diff --git a/vendored-deps/wasm-timer/Cargo.toml b/vendored-deps/wasm-timer/Cargo.toml
deleted file mode 100644
index ab2f6e2ac..000000000
--- a/vendored-deps/wasm-timer/Cargo.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-[package]
-name = "wasm-timer"
-edition = "2018"
-description = "Abstraction over std::time::Instant and futures-timer that works on WASM"
-version = "0.2.5"
-authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
-license = "MIT"
-repository = "https://github.com/tomaka/wasm-timer"
-
-[dependencies]
-futures = "0.3"
-parking_lot = "0.12"
-pin-utils = "0.1"
-
-[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
-js-sys = "0.3"
-wasm-bindgen = "0.2"
-wasm-bindgen-futures = "0.4"
-web-sys = { version = "0.3", features = ["Performance", "Window"] }
-
-[dev-dependencies]
-async-std = "1.0"
diff --git a/vendored-deps/wasm-timer/README.md b/vendored-deps/wasm-timer/README.md
deleted file mode 100644
index 70cd14f85..000000000
--- a/vendored-deps/wasm-timer/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Wasm-timer
-
-**This is a simple fork of the original repo at https://github.com/tomaka/wasm-timer**. The crate has
-not been updated since August 2020, and has a dependency on an older version of the `parking_lot`
-which breaks our WASM build (details here: https://github.com/Amanieu/parking_lot/issues/269).
-
-All we've done is update crate dependencies, in particualar bumping `parking_lot` to version `0.12`.


Test patch:
diff --git a/vendored-deps/reqwest-wrap/tests/wasm_simple.rs b/ergo-rest/tests/wasm_simple.rs
similarity index 88%
rename from vendored-deps/reqwest-wrap/tests/wasm_simple.rs
rename to ergo-rest/tests/wasm_simple.rs
index 870afe572..22b2895e2 100644
--- a/vendored-deps/reqwest-wrap/tests/wasm_simple.rs
+++ b/ergo-rest/tests/wasm_simple.rs
@@ -1,7 +1,6 @@
 #![cfg(target_arch = "wasm32")]
 #![allow(clippy::unused_unit)]
 
-use reqwest_wrap as reqwest;
 use std::time::Duration;
 use wasm_bindgen::prelude::*;
 use wasm_bindgen_test::*;
@@ -17,7 +16,7 @@ extern "C" {
 }
 #[wasm_bindgen_test]
 async fn simple_example() {
-    let res = reqwest::get("https://hyper.rs")
+    let res = ergo_rest::reqwest::get("https://hyper.rs")
         .await
         .expect("http get example");
 
@@ -29,7 +28,7 @@ async fn simple_example() {
 
 #[wasm_bindgen_test]
 async fn client_with_timeout() {
-    let client = reqwest::Client::new();
+    let client = ergo_rest::reqwest::Client::new();
     let err = client
         .get("https://hyper.rs")
         .timeout(Duration::from_millis(10))