From 8e66503e8f64076530f5f163befffa92246d886c Mon Sep 17 00:00:00 2001 From: Stygmates Date: Fri, 8 Sep 2023 04:18:13 +0200 Subject: [PATCH] Fix chrono WASM Cargo feature (#230) Enable chrono `wasmbind` feature to fix panic in WASM environments. --------- Co-authored-by: Truong Tan Dat --- Cargo-1.45.lock | 4 ++++ Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo-1.45.lock b/Cargo-1.45.lock index 7e1162c..c5253bd 100644 --- a/Cargo-1.45.lock +++ b/Cargo-1.45.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "anyhow" version = "1.0.58" @@ -191,10 +193,12 @@ version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ + "js-sys", "libc", "num-integer", "num-traits", "serde", + "wasm-bindgen", "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index 946a880..afe0922 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ serde_json = "1.0" sha2 = "0.10" ureq = { version = "2", optional = true } url = { version = "2.1", features = ["serde"] } -chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] } +chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std", "wasmbind"] } serde_path_to_error = "0.1.2" [target.'cfg(target_arch = "wasm32")'.dependencies]