Skip to content

Commit 597b263

Browse files
committed
Switch from wasm-timer to fluvio-wasm-timer...
... which addresses the problem from Amanieu/parking_lot#269 by taking the unmerged workaround of tomaka/wasm-timer#13 , as wasm-timer appears to be unmaintained.
1 parent ccf8063 commit 597b263

File tree

5 files changed

+25
-22
lines changed

5 files changed

+25
-22
lines changed

Cargo.lock

Lines changed: 20 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/client-libs/gateway-client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ version = "0.4"
4141
path = "../../wasm-utils"
4242

4343
# only import it in wasm. Prefer proper tokio timer in non-wasm
44-
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-timer]
45-
version = "0.2"
44+
[target."cfg(target_arch = \"wasm32\")".dependencies.fluvio-wasm-timer]
45+
version = "0.2.5"
4646

4747
# this is due to tungstenite using `rand` 0.8 and associated changes in `getrandom` crate
4848
# which now does not support wasm32-unknown-unknown target by default.

common/client-libs/gateway-client/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use tungstenite::protocol::Message;
2626
use tokio_tungstenite::connect_async;
2727

2828
#[cfg(target_arch = "wasm32")]
29-
use wasm_timer;
29+
use fluvio_wasm_timer as wasm_timer;
3030
#[cfg(target_arch = "wasm32")]
3131
use wasm_utils::websocket::JSWebsocket;
3232

common/client-libs/validator-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ reqwest = { version="0.11", features=["json"] }
1616
thiserror = "1"
1717
log = "0.4"
1818
url = "2"
19-
wasm-timer = "0.2"
19+
fluvio-wasm-timer = "0.2.5"
2020

2121
# required for nymd-client
2222
# at some point it might be possible to make it wasm-compatible

common/client-libs/validator-client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl Client {
141141
error!("{}", url)
142142
}
143143
// Went with only wasm_timer so we can avoid features on the lib, and pulling in tokio
144-
wasm_timer::Delay::new(Duration::from_secs(sleep_secs)).await?;
144+
fluvio_wasm_timer::Delay::new(Duration::from_secs(sleep_secs)).await?;
145145
}
146146
}
147147

0 commit comments

Comments
 (0)