2021-10-05 14:24:08 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Lynnesbian
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2021-02-04 11:22:19 +00:00
|
|
|
[package]
|
|
|
|
name = "fif"
|
2021-02-14 16:20:48 +00:00
|
|
|
description = "A command-line tool for detecting and optionally correcting files with incorrect extensions."
|
2022-01-01 03:28:45 +00:00
|
|
|
version = "0.5.0"
|
2021-02-04 11:22:19 +00:00
|
|
|
authors = ["Lynnesbian <lynne@bune.city>"]
|
|
|
|
edition = "2018"
|
2021-02-05 05:57:21 +00:00
|
|
|
license = "GPL-3.0-or-later"
|
2022-01-01 03:28:45 +00:00
|
|
|
rust-version = "1.54.0" # clap 3 requires >=1.54.0
|
2021-04-21 07:29:13 +00:00
|
|
|
repository = "https://gitlab.com/Lynnesbian/fif"
|
2021-02-21 15:55:27 +00:00
|
|
|
readme = "README.md"
|
|
|
|
keywords = ["mime", "mimetype", "utilities", "tools"]
|
|
|
|
categories = ["command-line-utilities"]
|
2021-04-27 08:34:01 +00:00
|
|
|
exclude = [".idea/", "*.toml", "!Cargo.toml", "*.sh", "*.py", "*.yml", "*.md", ".mailmap", "pkg/"]
|
2021-02-04 11:22:19 +00:00
|
|
|
|
2021-03-01 10:20:46 +00:00
|
|
|
[badges]
|
|
|
|
maintenance = { status = "experimental" }
|
|
|
|
|
2021-02-06 11:51:20 +00:00
|
|
|
[features]
|
2021-05-05 22:57:42 +00:00
|
|
|
default = ["multi-threaded", "json"]
|
2021-09-25 08:55:50 +00:00
|
|
|
multi-threaded = ["rayon", "num_cpus"]
|
2021-05-09 23:43:41 +00:00
|
|
|
infer-backend = ["infer"]
|
|
|
|
xdg-mime-backend = ["xdg-mime"]
|
2021-05-05 22:57:42 +00:00
|
|
|
json = ["serde", "serde_json"]
|
2021-02-06 11:51:20 +00:00
|
|
|
|
2021-02-04 11:22:19 +00:00
|
|
|
[dependencies]
|
2021-08-25 05:25:22 +00:00
|
|
|
walkdir = "~2.3.2"
|
2021-02-04 11:22:19 +00:00
|
|
|
log = "0.4.14"
|
2021-08-06 13:33:42 +00:00
|
|
|
mime = "0.3.16"
|
2021-11-24 22:40:57 +00:00
|
|
|
mime_guess = { package = "new_mime_guess", features = ["phf-map"], version = "4.0.0" }
|
2021-02-10 09:20:22 +00:00
|
|
|
snailquote = "0.3.0"
|
2021-06-14 06:53:41 +00:00
|
|
|
once_cell = "1.8.0"
|
2021-02-14 19:20:04 +00:00
|
|
|
rayon = { version = "1.5.0", optional = true }
|
2021-02-21 14:07:50 +00:00
|
|
|
exitcode = "1.1.2"
|
2021-02-27 02:02:49 +00:00
|
|
|
cfg-if = "1.0.0"
|
2021-04-20 08:52:49 +00:00
|
|
|
itertools = "0.10.0"
|
2021-05-05 22:57:42 +00:00
|
|
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
|
|
|
serde_json = { version = "1.0", optional = true }
|
2021-09-25 08:55:50 +00:00
|
|
|
num_cpus = { version = "1.13.0", optional = true }
|
2021-10-04 14:18:42 +00:00
|
|
|
maplit = "1.0.2"
|
2021-11-22 22:38:43 +00:00
|
|
|
parking_lot = "0.11.2"
|
2021-02-19 18:02:54 +00:00
|
|
|
|
2021-05-09 23:43:41 +00:00
|
|
|
[target.'cfg(not(unix))'.dependencies]
|
|
|
|
xdg-mime = { version = "0.3.3", optional = true }
|
2022-01-15 18:36:38 +00:00
|
|
|
infer = "0.6.0"
|
2021-05-09 23:43:41 +00:00
|
|
|
|
2021-03-02 15:12:29 +00:00
|
|
|
[target.'cfg(unix)'.dependencies]
|
2021-04-20 07:26:31 +00:00
|
|
|
xdg-mime = "0.3.3"
|
2022-01-15 18:36:38 +00:00
|
|
|
infer = { version = "0.6.0", optional = true }
|
2021-02-28 09:47:18 +00:00
|
|
|
|
2021-04-02 17:51:49 +00:00
|
|
|
[target.'cfg(not(all(target_endian = "big", target_pointer_width = "32")))'.dependencies]
|
2021-07-29 06:26:16 +00:00
|
|
|
# the seemingly weird target constraint here is due to this:
|
2021-10-05 15:30:13 +00:00
|
|
|
# https://github.com/bodil/smartstring/blob/v0.2.9/src/config.rs#L91-L93
|
2021-07-29 06:26:16 +00:00
|
|
|
# essentially, smartstring is intentionally blocked from compiling on 32-bit big endian archs, so our dependency on it
|
|
|
|
# needs to be too. otherwise, fif won't work on platforms like powerpc, even though this dependency is the only
|
|
|
|
# blocker -- fif runs just fine on powerpc without smartstring. or at least, just fine under qemu user-mode powerpc ~u0
|
|
|
|
|
2021-10-04 16:12:16 +00:00
|
|
|
# additionally, versions before 0.2.4 didn't impl Display, so we need at least that version for displaying Strings.
|
|
|
|
smartstring = ">= 0.2.4"
|
2021-04-02 17:51:49 +00:00
|
|
|
|
2021-02-05 12:45:51 +00:00
|
|
|
[dependencies.clap]
|
2021-08-15 16:10:50 +00:00
|
|
|
# beta.4 requires rust >= 1.54.0 (and beta.3 was yanked)
|
2022-01-01 03:28:45 +00:00
|
|
|
version = "3.0.0"
|
2021-02-11 15:43:47 +00:00
|
|
|
default-features = false
|
2022-01-01 03:28:45 +00:00
|
|
|
features = ["wrap_help", "color", "derive", "std", "unicode"]
|
2021-08-18 13:42:44 +00:00
|
|
|
|
2021-02-05 13:34:02 +00:00
|
|
|
[dependencies.env_logger]
|
2021-08-03 05:27:03 +00:00
|
|
|
version = "0.9.0"
|
2021-02-05 13:34:02 +00:00
|
|
|
default-features = false
|
|
|
|
features = ["termcolor", "atty"]
|
|
|
|
|
2021-02-28 09:47:18 +00:00
|
|
|
[dev-dependencies]
|
|
|
|
tempfile = "3.2.0"
|
2021-04-29 07:07:58 +00:00
|
|
|
rand = "0.8.3"
|
2022-01-01 03:02:27 +00:00
|
|
|
assert_cmd = "2.0.2"
|
2022-01-01 03:28:45 +00:00
|
|
|
regex = { version = "1.5.4", default-features = false, features = ["std"] }
|
2021-02-28 09:47:18 +00:00
|
|
|
|
2021-02-05 13:34:02 +00:00
|
|
|
[profile.release]
|
2021-02-06 11:48:31 +00:00
|
|
|
lto = "thin"
|
2021-02-10 09:20:22 +00:00
|
|
|
|
2021-04-20 08:52:49 +00:00
|
|
|
# optimise dependencies, even when producing debug and test builds
|
2021-02-10 09:20:22 +00:00
|
|
|
[profile.dev.package."*"]
|
|
|
|
opt-level = 3
|
2021-04-20 08:52:49 +00:00
|
|
|
|
|
|
|
[profile.test.package."*"]
|
|
|
|
opt-level = 3
|
2021-09-17 08:51:41 +00:00
|
|
|
|
|
|
|
[package.metadata]
|
2022-01-01 03:28:45 +00:00
|
|
|
msrv = "1.54.0"
|