auditlog 0.1.0

Audit trail for your data models — an ORM-agnostic core with a pluggable, async sqlx backend (SQLite & Postgres).
Documentation
[package]
name = "auditlog"
version = "0.1.0"
edition = "2024"
description = "Audit trail for your data models — an ORM-agnostic core with a pluggable, async sqlx backend (SQLite & Postgres)."
license = "MIT"
keywords = ["audit", "audit-log", "audited", "versioning", "history"]
categories = ["database", "data-structures"]
readme = "README.md"
repository = "https://github.com/JijoBose/auditlog"
documentation = "https://docs.rs/auditlog"
rust-version = "1.88"

[features]
default = ["sqlite"]
# Built-in async backend on SQLite (great for tests/dev).
sqlite = ["dep:sqlx", "sqlx/sqlite", "sqlx/runtime-tokio", "sqlx/macros"]
# Built-in async backend on Postgres.
postgres = ["dep:sqlx", "sqlx/postgres", "sqlx/runtime-tokio", "sqlx/macros"]
# Enables the Dockerized Postgres integration tests (tests/postgres.rs). Requires a running
# Docker daemon. Run with: `cargo test --features pg-tests`. The optional testcontainers
# dependency is only compiled when this feature is on, so normal builds/tests never pull it.
pg-tests = ["postgres", "dep:testcontainers-modules"]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
indexmap = { version = "2", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
async-trait = "0.1"
thiserror = "2"
tokio = { version = "1", features = ["rt"] }
sqlx = { version = "0.8", default-features = false, optional = true }
# Only pulled in by the `pg-tests` feature (Dockerized Postgres integration tests).
testcontainers-modules = { version = "0.12", features = ["postgres"], optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "rt", "time"] }

[[example]]
name = "blog"
required-features = ["sqlite"]

[package.metadata.docs.rs]
# Build documentation with both built-in backends so the Postgres API is included.
features = ["sqlite", "postgres"]