From a27b83e4d2f785aaa421c07a29a13233b4b5204a Mon Sep 17 00:00:00 2001 From: Guillaume Turchini Date: Sat, 5 Jun 2021 02:34:46 +0200 Subject: [PATCH 1/2] Fix compiling for wasm32-unknown-emscripten target error[E0428]: the name `inner` is defined multiple times --> /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.19/src/sys.rs:25:1 | 21 | mod inner; | ---------- previous definition of the module `inner` here ... 25 | mod inner; | ^^^^^^^^^^ `inner` redefined here | = note: `inner` must be defined only once in the type namespace of this module --- src/sys.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sys.rs b/src/sys.rs index 2e46b7e8eb..0fa67838eb 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -20,11 +20,11 @@ use std::time::{SystemTime, UNIX_EPOCH}; #[path = "sys/stub.rs"] mod inner; -#[cfg(unix)] +#[cfg(all(unix, not(target_arch = "wasm32"), not(target_env = "sgx")))] #[path = "sys/unix.rs"] mod inner; -#[cfg(windows)] +#[cfg(all(windows, not(target_arch = "wasm32"), not(target_env = "sgx")))] #[path = "sys/windows.rs"] mod inner; From b3cea499191257b678454091d2539fce7311db76 Mon Sep 17 00:00:00 2001 From: Guillaume Turchini Date: Sat, 5 Jun 2021 03:44:12 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16a9063b60..facfb9e1ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Versions with only mechanical changes will be omitted from the following list. * Add support for microseconds timestamps serde serialization/deserialization (#304) * Fix `DurationRound` is not TZ aware (#495) * Implement `DurationRound` for `NaiveDateTime` +* Correct build for wasm32-unknown-emscripten target ## 0.4.19