# 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 = "spring-batch-rs"
version = "0.3.4"
authors = ["Simon Boussekeyt <sboussekeyt@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A toolkit for building enterprise-grade batch applications"
homepage = "https://spring-batch-rs.boussekeyt.dev"
documentation = "https://docs.rs/spring-batch-rs"
readme = "README.md"
keywords = [
    "batch",
    "etl",
    "data",
    "pipeline",
    "processing",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/sboussekeyt/spring-batch-rs"

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

[features]
csv = [
    "dep:csv",
    "dep:tempfile",
]
default = []
fake = [
    "dep:fake",
    "dep:time",
]
ftp = ["dep:suppaftp"]
full = [
    "csv",
    "json",
    "logger",
    "fake",
    "rdbc-postgres",
    "rdbc-mysql",
    "rdbc-sqlite",
    "mongodb",
    "xml",
    "zip",
    "ftp",
    "orm",
    "s3",
]
json = []
logger = []
mongodb = [
    "mongodb/sync",
    "bson",
]
orm = ["dep:sea-orm"]
rdbc = []
rdbc-mysql = [
    "sqlx/mysql",
    "rdbc",
    "dep:chrono",
]
rdbc-postgres = [
    "sqlx/postgres",
    "rdbc",
    "dep:chrono",
]
rdbc-sqlite = [
    "sqlx/sqlite",
    "rdbc",
    "dep:chrono",
]
s3 = [
    "dep:aws-sdk-s3",
    "dep:aws-config",
    "dep:tokio-util",
]
tests-cfg = ["full"]
xml = [
    "dep:quick-xml",
    "dep:tempfile",
]
zip = ["dep:zip"]

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

[[example]]
name = "advanced_patterns"
path = "examples/advanced_patterns.rs"
required-features = [
    "csv",
    "json",
    "logger",
]

[[example]]
name = "benchmark_csv_postgres_xml"
path = "examples/benchmark_csv_postgres_xml.rs"
required-features = [
    "csv",
    "xml",
    "rdbc-postgres",
]

[[example]]
name = "chaining_processors"
path = "examples/chaining_processors.rs"
required-features = [
    "csv",
    "json",
]

[[example]]
name = "chaining_writers"
path = "examples/chaining_writers.rs"
required-features = [
    "csv",
    "json",
    "logger",
]

[[example]]
name = "csv_processing"
path = "examples/csv_processing.rs"
required-features = [
    "csv",
    "json",
]

[[example]]
name = "database_processing"
path = "examples/database_processing.rs"
required-features = [
    "rdbc-sqlite",
    "csv",
    "json",
    "logger",
]

[[example]]
name = "filter_records_from_csv_with_processor"
path = "examples/filter_records_from_csv_with_processor.rs"
required-features = [
    "csv",
    "json",
]

[[example]]
name = "json_processing"
path = "examples/json_processing.rs"
required-features = [
    "json",
    "csv",
    "logger",
]

[[example]]
name = "mongodb_processing"
path = "examples/mongodb_processing.rs"
required-features = [
    "mongodb",
    "csv",
    "json",
]

[[example]]
name = "orm_processing"
path = "examples/orm_processing.rs"
required-features = [
    "orm",
    "csv",
    "json",
]

[[example]]
name = "tasklet_ftp"
path = "examples/tasklet_ftp.rs"
required-features = ["ftp"]

[[example]]
name = "tasklet_s3"
path = "examples/tasklet_s3.rs"
required-features = ["s3"]

[[example]]
name = "tasklet_zip"
path = "examples/tasklet_zip.rs"
required-features = ["zip"]

[[example]]
name = "xml_processing"
path = "examples/xml_processing.rs"
required-features = [
    "xml",
    "json",
    "csv",
]

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.anyhow]
version = "1.0"

[dependencies.aws-config]
version = "1"
optional = true

[dependencies.aws-sdk-s3]
version = "1"
optional = true

[dependencies.bson]
version = "3.0"
features = ["compat-3-0-0"]
optional = true
default-features = false

[dependencies.chrono]
version = "0.4"
features = ["serde"]
optional = true

[dependencies.csv]
version = "1.4"
optional = true

[dependencies.fake]
version = "5.1"
features = ["time"]
optional = true

[dependencies.log]
version = "0.4"

[dependencies.mongodb]
version = "3.5"
features = ["sync"]
optional = true

[dependencies.quick-xml]
version = "0.39"
features = ["serialize"]
optional = true

[dependencies.rand]
version = "0.10"

[dependencies.sea-orm]
version = "1.1"
features = [
    "sqlx-postgres",
    "sqlx-mysql",
    "sqlx-sqlite",
    "runtime-tokio-native-tls",
    "macros",
    "mock",
]
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.sqlx]
version = "0.8"
features = ["runtime-tokio"]
optional = true

[dependencies.suppaftp]
version = "8.0"
features = ["native-tls"]
optional = true

[dependencies.tempfile]
version = "3.20"
optional = true

[dependencies.thiserror]
version = "2.0"

[dependencies.time]
version = "0.3"
features = ["serde-human-readable"]
optional = true

[dependencies.tokio]
version = "1.49"
features = ["full"]

[dependencies.tokio-util]
version = "0.7"
features = ["io"]
optional = true

[dependencies.uuid]
version = "1.18"
features = ["v4"]

[dependencies.zip]
version = "8.5"
optional = true

[dev-dependencies.aws-config]
version = "1"

[dev-dependencies.aws-sdk-s3]
version = "1"

[dev-dependencies.env_logger]
version = "0.11"

[dev-dependencies.mockall]
version = "0.14"

[dev-dependencies.rand]
version = "0.10"

[dev-dependencies.testcontainers]
version = "0.27"

[dev-dependencies.testcontainers-modules]
version = "0.15"
features = [
    "postgres",
    "mysql",
    "mongo",
    "blocking",
    "localstack",
]

[dev-dependencies.tokio]
version = "1.0"
features = ["full"]

[profile.dev]
opt-level = 0

[profile.release]
opt-level = 3
