[package]
name = "outline-core"
version = "0.2.0"
edition = "2024"
repository = "https://github.com/wyh2001/outline"
license = "MIT"
description = "Image background removal with flexible mask processing options"
exclude = [".github/**", "dist-workspace.toml"]

[features]
default = ["backend-ort", "ort-download-binaries"]
cli = ["clap", "vectorizer-vtracer"]
vectorizer-vtracer = ["dep:vtracer", "dep:visioncortex"]
fetch-model = ["dep:ureq", "dep:indicatif", "dep:sha2", "dep:dirs"]
backend-ort = ["dep:ort"]
backend-rten = ["dep:rten"]
# Preserve ort's default feature set.
ort-download-binaries = [
    "backend-ort",
    "ort/download-binaries",
    "ort/tls-native",
    "ort-copy-dylibs",
]
ort-load-dynamic = ["backend-ort", "ort/load-dynamic"]
ort-pkg-config = ["backend-ort", "ort/pkg-config"]
ort-copy-dylibs = ["backend-ort", "ort/copy-dylibs"]

[lib]
name = "outline"
path = "src/lib.rs"

[package.metadata.docs.rs]
no-default-features = true
features = ["cli", "fetch-model", "ort-load-dynamic"]
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
image = "0.25.10"
ort = { version = "=2.0.0-rc.12", default-features = false, features = [
    "std",
    "ndarray",
    "tracing",
    "api-24",
], optional = true }
rten = { version = "0.24.0", optional = true }
vtracer = { version = "0.6.5", optional = true }
ndarray = "0.17"
visioncortex = { version = "0.8.10", optional = true }
imageproc = "0.27.0"
thiserror = "2"
clap = { version = "4", features = ["derive", "env"], optional = true }
ureq = { version = "3", optional = true }
indicatif = { version = "0.18", optional = true }
sha2 = { version = "0.10", optional = true }
dirs = { version = "6", optional = true }

[[bin]]
name = "outline"
path = "src/main.rs"
required-features = ["cli"]

[dev-dependencies]
proptest = "1.11.0"
tempfile = "3"

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
