less unneeded backend compilation
previous behaviour: all platforms would compile both infer and xdg-mime new behaviour: unix platforms always compile xdg-mime but only compile infer if the `infer-backend` feature is enabled, and windows always compiles infer but only compiles xdg-mime if the `xdg-mime-backend` feature is enabled.
This commit is contained in:
parent
8341c4aaf7
commit
a50350a15e
1 changed files with 7 additions and 3 deletions
10
Cargo.toml
10
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"
|
||||
|
|
Loading…
Reference in a new issue