# 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"
rust-version = "1.85"
name = "katha"
version = "0.1.1"
authors = ["Kunjan Dalal <kunjee17@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Event sourcing core traits, types, and SQLite/Postgres backend for Rust"
readme = "README.md"
keywords = [
    "event-sourcing",
    "cqrs",
    "event-store",
    "sqlite",
    "eventstore",
]
categories = [
    "database",
    "asynchronous",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/manchhq/katha"

[features]
default = []
macros = ["dep:katha-macros"]
sqlx = [
    "dep:sqlx",
    "dep:libsqlite3-sys",
    "dep:tokio-util",
]

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

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

[[test]]
name = "sqlx_behavioral_projection_flow_tests"
path = "tests/sqlx_behavioral_projection_flow_tests.rs"
required-features = ["sqlx"]

[[test]]
name = "sqlx_command_store_tests"
path = "tests/sqlx_command_store_tests.rs"
required-features = ["sqlx"]

[[test]]
name = "sqlx_event_store_tests"
path = "tests/sqlx_event_store_tests.rs"
required-features = ["sqlx"]

[[test]]
name = "sqlx_property_tests"
path = "tests/sqlx_property_tests.rs"
required-features = ["sqlx"]

[dependencies.anyhow]
version = "1.0"

[dependencies.async-trait]
version = "0.1"

[dependencies.chrono]
version = "0.4"
features = [
    "serde",
    "clock",
]

[dependencies.katha-macros]
version = "0.1.1"
optional = true

[dependencies.libsqlite3-sys]
version = "0.30"
features = ["bundled"]
optional = true

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

[dependencies.serde_json]
version = "1"

[dependencies.sqlx]
version = "0.8"
features = [
    "runtime-tokio",
    "chrono",
    "uuid",
    "migrate",
    "sqlite",
    "postgres",
    "any",
]
optional = true

[dependencies.tokio]
version = "1.35"
features = [
    "macros",
    "rt-multi-thread",
    "time",
    "sync",
]

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

[dependencies.uuid]
version = "1"
features = [
    "v4",
    "serde",
]

[dev-dependencies.katha-macros]
version = "0.1.1"

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

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

[dev-dependencies.tokio]
version = "1.35"
features = [
    "macros",
    "rt-multi-thread",
    "time",
]
