Changing the feature rt-multi-thread to rt, since it's just for testing purposes and rt-multi-thread is not supported for WASM.
Importing getrandom explicitly with js feature, so rand becomes WASM compatible.
Removing the line *request.timeout_mut() = None;, because timeout_mut is not implemented for WASM (I originally had #[cfg(not(target_arch = "wasm32"))] above the line but I feel like the line is actually unnecessary there (looks like no timeout is the default value for the current version of Reqwest).
I have also added a check against the wasm32-unknown-unknown target as a part of the github workflows.
Makes the library WASM compatible by:
rt-multi-thread
tort
, since it's just for testing purposes andrt-multi-thread
is not supported for WASM.getrandom
explicitly withjs
feature, sorand
becomes WASM compatible.*request.timeout_mut() = None;
, becausetimeout_mut
is not implemented for WASM (I originally had#[cfg(not(target_arch = "wasm32"))]
above the line but I feel like the line is actually unnecessary there (looks like no timeout is the default value for the current version of Reqwest).I have also added a check against the
wasm32-unknown-unknown
target as a part of the github workflows.