# 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 = "2021"
name = "sage-persistence"
version = "2.1.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Persistence layer for Sage agent checkpoints"
readme = false
license = "MIT"
repository = "https://github.com/sagelang/sage"

[features]
default = ["sqlite"]
file = []
postgres = ["sqlx"]
sqlite = ["rusqlite"]

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

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

[dependencies.rusqlite]
version = "0.32"
features = ["bundled"]
optional = true

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

[dependencies.serde_json]
version = "1"

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

[dependencies.thiserror]
version = "2"

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

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

[dev-dependencies.tokio-test]
version = "0.4"

[lints.clippy]
approx_constant = "allow"
collapsible_match = "allow"
ptr_arg = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust]
unsafe_code = "forbid"
