diff --git a/Cargo.toml b/Cargo.toml index 34da334..e628e35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,8 @@ maintenance = { status = "experimental" } [features] default = ["multi-threaded", "json"] multi-threaded = ["rayon"] -infer-backend = [] -xdg-mime-backend = [] +infer-backend = ["infer"] +xdg-mime-backend = ["xdg-mime"] json = ["serde", "serde_json"] [dependencies] @@ -30,7 +30,6 @@ log = "0.4.14" mime_guess = { package = "new_mime_guess", version = "2.1.0" } snailquote = "0.3.0" once_cell = "1.7.2" -infer = "0.4.0" rayon = { version = "1.5.0", optional = true } exitcode = "1.1.2" cfg-if = "1.0.0" @@ -38,8 +37,13 @@ itertools = "0.10.0" serde = { version = "1.0", features = ["derive"], optional = true } serde_json = { version = "1.0", optional = true } +[target.'cfg(not(unix))'.dependencies] +xdg-mime = { version = "0.3.3", optional = true } +infer = "0.4.0" + [target.'cfg(unix)'.dependencies] xdg-mime = "0.3.3" +infer = { version = "0.4.0", optional = true} [target.'cfg(not(all(target_endian = "big", target_pointer_width = "32")))'.dependencies] smartstring = "0.2.6"