# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "outline-core"
version = "0.2.0"
build = false
exclude = [
    ".github/**",
    "dist-workspace.toml",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Image background removal with flexible mask processing options"
readme = "README.md"
license = "MIT"
repository = "https://github.com/wyh2001/outline"

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

[features]
backend-ort = ["dep:ort"]
backend-rten = ["dep:rten"]
cli = [
    "clap",
    "vectorizer-vtracer",
]
default = [
    "backend-ort",
    "ort-download-binaries",
]
fetch-model = [
    "dep:ureq",
    "dep:indicatif",
    "dep:sha2",
    "dep:dirs",
]
ort-copy-dylibs = [
    "backend-ort",
    "ort/copy-dylibs",
]
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",
]
vectorizer-vtracer = [
    "dep:vtracer",
    "dep:visioncortex",
]

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

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

[[test]]
name = "in_memory_inputs"
path = "tests/in_memory_inputs.rs"

[[test]]
name = "runtime_dynamic"
path = "tests/runtime_dynamic.rs"

[[test]]
name = "runtime_dynamic_env"
path = "tests/runtime_dynamic_env.rs"

[dependencies.clap]
version = "4"
features = [
    "derive",
    "env",
]
optional = true

[dependencies.dirs]
version = "6"
optional = true

[dependencies.image]
version = "0.25.10"

[dependencies.imageproc]
version = "0.27.0"

[dependencies.indicatif]
version = "0.18"
optional = true

[dependencies.ndarray]
version = "0.17"

[dependencies.ort]
version = "=2.0.0-rc.12"
features = [
    "std",
    "ndarray",
    "tracing",
    "api-24",
]
optional = true
default-features = false

[dependencies.rten]
version = "0.24.0"
optional = true

[dependencies.sha2]
version = "0.10"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.ureq]
version = "3"
optional = true

[dependencies.visioncortex]
version = "0.8.10"
optional = true

[dependencies.vtracer]
version = "0.6.5"
optional = true

[dev-dependencies.proptest]
version = "1.11.0"

[dev-dependencies.tempfile]
version = "3"

[profile.dist]
lto = "thin"
inherits = "release"
