Skip to content

Commit

Permalink
Put wasm-bindgen and js-sys behind a wasm-bindgen feature gate
Browse files Browse the repository at this point in the history
Fixes #334
  • Loading branch information
quodlibetor committed Sep 2, 2019
1 parent 630cade commit 07c55dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ name = "chrono"
[features]
default = ["clock"]
clock = ["time"]
wasm-bindgen = ["wasm-bindgen", "js-sys"]

[dependencies]
libc = { version = "0.2", default-features = false }
Expand All @@ -35,10 +36,9 @@ num-traits = { version = "0.2", default-features = false }
rustc-serialize = { version = "0.3.20", optional = true }
serde = { version = "1", optional = true }


[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
wasm-bindgen = { version = "0.2" }
js-sys = "0.3" # contains FFI bindings for the JS Date API
wasm-bindgen = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true } # contains FFI bindings for the JS Date API

[dev-dependencies]
serde_json = { version = "1" }
Expand Down

0 comments on commit 07c55dd

Please sign in to comment.