[package]
name = "qrcode-rs"
description = "QR code encoder in Rust，Generate QR Code matrices and images in RAW, PNG and SVG formats."
license = "MIT OR Apache-2.0"
version = "0.4.0"
edition = "2024"
authors = ["houseme <housemecn@gmail.com>"]
repository = "https://github.com/houseme/qrcode-rs"
homepage = "https://houseme.github.io/qrcode-rs"
documentation = "https://docs.rs/qrcode-rs/"
keywords = ["qrcode", "generate", "encoder", "image", "barcode"]
categories = ["encoding", "multimedia::images", "multimedia::encoding"]
readme = "README.md"
# Crate build related
exclude = ["tests/*", ".gitignore"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[profile.release]
opt-level = 3
debug = false

[dependencies]
image = { version = "0.25.10", default-features = false, optional = true }
clap = { version = "4.5", default-features = false, features = ["std", "derive", "help", "usage", "error-context", "suggestions"], optional = true }

[dev-dependencies]
image = "0.25.10"

[features]
default = ["image", "svg", "pic", "eps", "html", "pdf"]
image = ["dep:image", "image/png"]
svg = []
pic = []
eps = []
html = []
pdf = []
# Enables the `qrencodes` CLI binary (pulls in clap + all render backends).
# The library stays zero-dependency when this feature is off.
cli = ["dep:clap", "image", "svg", "eps", "pic", "html", "pdf"]

[[bin]]
name = "qrencodes"
required-features = ["cli"]

[[example]]
name = "encode_image"
required-features = ["image"]

[[example]]
name = "encode_string"

[[example]]
name = "encode_svg"
required-features = ["svg"]

[[example]]
name = "encode_unicode"

[[example]]
name = "encode_eps"
required-features = ["eps"]

[[example]]
name = "encode_pic"
required-features = ["pic"]

[[example]]
name = "encode_html"
required-features = ["html"]

[[example]]
name = "custom_colors"
required-features = ["image"]

[[example]]
name = "cli_tool"
required-features = ["cli"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]