# SPDX-FileCopyrightText: 2022 Shun Sakai
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

[package]
name = "qrtool"
version = "0.11.0"
authors = ["Shun Sakai <sorairolake@protonmail.ch>"]
edition = "2021"
rust-version = "1.74.0"
description = "An utility for encoding or decoding QR code"
readme = "README.md"
homepage = "https://sorairolake.github.io/qrtool/"
repository = "https://github.com/sorairolake/qrtool"
license = "Apache-2.0 OR MIT"
keywords = ["qrcode"]
categories = ["command-line-utilities"]
include = ["/LICENSES", "/README.md", "/src"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.86"
clap = { version = "4.5.8", features = ["derive", "wrap_help"] }
clap_complete = "4.5.7"
clap_complete_nushell = "4.5.2"
csscolorparser = "0.6.2"
image = { version = "0.25.1", default-features = false, features = ["png", "rayon"] }
oxipng = { version = "9.1.1", default-features = false, features = ["parallel", "zopfli"], optional = true }
qrcode = "0.14.0"
resvg = { version = "0.42.0", default-features = false, optional = true }
rqrr = "0.7.1"
sysexits = "0.8.1"

[dev-dependencies]
assert_cmd = "2.0.14"
predicates = "3.1.0"

[features]
default = [
  "decode-from-bmp",
  "decode-from-dds",
  "decode-from-ff",
  "decode-from-gif",
  "decode-from-hdr",
  "decode-from-ico",
  "decode-from-jpeg",
  "decode-from-exr",
  "decode-from-pnm",
  "decode-from-qoi",
  "decode-from-tga",
  "decode-from-tiff",
  "decode-from-webp",
  "decode-from-svg",
  "optimize-output-png",
]
decode-from-bmp = ["image/bmp"]
decode-from-dds = ["image/dds"]
decode-from-ff = ["image/ff"]
decode-from-gif = ["image/gif"]
decode-from-hdr = ["image/hdr"]
decode-from-ico = ["image/ico"]
decode-from-jpeg = ["image/jpeg"]
decode-from-exr = ["image/exr"]
decode-from-pnm = ["image/pnm"]
decode-from-qoi = ["image/qoi"]
decode-from-tga = ["image/tga"]
decode-from-tiff = ["image/tiff"]
decode-from-webp = ["image/webp"]
decode-from-svg = ["dep:resvg"]
optimize-output-png = ["dep:oxipng"]

[profile.release]
codegen-units = 1
lto = true
panic = "abort"
strip = true
