From e8c3d2f4bcbaa61f51ebbb08b0ca31f29d6909af Mon Sep 17 00:00:00 2001 From: misssonder <819643718@qq.com> Date: Tue, 6 Aug 2024 19:51:40 +0800 Subject: [PATCH] Fix wasm build --- Cargo.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aed5f7634..18240dfb5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -155,9 +155,8 @@ codegen-units = 1 #opt-level = "z" # optimize for size #panic = 'abort' # remove stack backtrace for no-std -[target.'cfg(target_family = "wasm")'.dependencies] -[target.'cfg(not(feature = "no_time"))'.dependencies] -web-time = { version = "1.1.0" ,optional = true}# WASM implementation of std::time::Instant +[target.'cfg(all(target_family = "wasm", not(feature = "no_time")))'.dependencies] +web-time = { version = "1.1.0" }# WASM implementation of std::time::Instant [package.metadata.docs.rs] features = ["document-features", "metadata", "serde", "internals", "decimal", "debugging"]