Skip to content

Commit

Permalink
allow optional wasmbindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
esheppa committed Aug 11, 2022
1 parent 95223ee commit 78855fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Expand Up @@ -20,13 +20,13 @@ appveyor = { repository = "chronotope/chrono" }
name = "chrono"

[features]
default = ["clock", "std", "oldtime"]
default = ["clock", "std", "oldtime", "wasmbind"]
alloc = []
libc = []
std = []
clock = ["std", "winapi", "iana-time-zone"]
oldtime = ["time"]
wasmbind = [] # TODO: empty feature to avoid breaking change in 0.4.20, can be removed later
wasmbind = ["wasm-bindgen", "js-sys"]
unstable-locales = ["pure-rust-locales", "alloc"]
__internal_bench = ["criterion"]
__doctest = []
Expand All @@ -42,8 +42,8 @@ criterion = { version = "0.3", optional = true }
rkyv = {version = "0.7", optional = true}

[target.'cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))'.dependencies]
wasm-bindgen = { version = "0.2" }
js-sys = { version = "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

[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "solaris")))'.dependencies]
iana-time-zone = { version = "0.1.41", optional = true }
Expand Down

0 comments on commit 78855fb

Please sign in to comment.