Skip to content

Commit

Permalink
Make iana-time-zone a target specific dependency
Browse files Browse the repository at this point in the history
Currently, iana-tiime-zone is only used on cfg(unix). This crate,
and its windows code in particular, contains a lot of unsafe, so it
seems prudent to limit its scope to where it is actually needed.
  • Loading branch information
krtab authored and djc committed Mar 7, 2023
1 parent cf2a2f9 commit fb2f259
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ serde = { version = "1.0.99", default-features = false, optional = true }
pure-rust-locales = { version = "0.5.2", optional = true }
criterion = { version = "0.4.0", optional = true }
rkyv = {version = "0.7", optional = true}
iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] }
arbitrary = { version = "1.0.0", features = ["derive"], optional = true }

[target.'cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))'.dependencies]
Expand All @@ -47,6 +46,9 @@ js-sys = { version = "0.3", optional = true } # contains FFI bindings for the JS
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.0", features = ["std", "minwinbase", "minwindef", "timezoneapi"], optional = true }

[target.'cfg(unix)'.dependencies]
iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] }

[dev-dependencies]
serde_json = { version = "1" }
serde_derive = { version = "1", default-features = false }
Expand Down

0 comments on commit fb2f259

Please sign in to comment.