Cargo.toml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. [package]
  2. name = "kuatia-storage-sql"
  3. description = "SQLite/PostgreSQL storage backend for the Kuatia ledger."
  4. version.workspace = true
  5. edition.workspace = true
  6. rust-version.workspace = true
  7. license.workspace = true
  8. repository.workspace = true
  9. authors.workspace = true
  10. keywords.workspace = true
  11. categories.workspace = true
  12. [lints]
  13. workspace = true
  14. [dependencies]
  15. kuatia-types.workspace = true
  16. kuatia-storage.workspace = true
  17. sqlx = { workspace = true, features = ["macros"] }
  18. async-trait.workspace = true
  19. serde.workspace = true
  20. serde_json.workspace = true
  21. # Pinned to the exact version sqlx-sqlite depends on, with default features off
  22. # to match: it is a `links = "sqlite3"` crate, so the whole graph must resolve to
  23. # one instance. Only needed to register the money functions (see `sqlite_ext`).
  24. libsqlite3-sys = { version = "0.30.1", default-features = false, optional = true }
  25. [dev-dependencies]
  26. tokio = { workspace = true, features = ["full"] }
  27. paste.workspace = true
  28. kuatia-types.workspace = true
  29. kuatia-storage.workspace = true
  30. sqlx = { workspace = true, features = ["macros"] }
  31. serde_json.workspace = true
  32. [features]
  33. default = ["sqlite"]
  34. sqlite = ["sqlx/sqlite", "dep:libsqlite3-sys"]
  35. postgres = ["sqlx/postgres"]
  36. # Opt-in gate for the Postgres conformance suite (`tests/postgres.rs`), which
  37. # needs a live `DATABASE_URL`. Kept distinct from `postgres` so that a plain
  38. # `cargo test` (which unifies `postgres` on via the dashboard's dependency) does
  39. # not try to run it; only the dedicated CI job enables `test-postgres`.
  40. test-postgres = ["postgres"]
  41. # Pass through to the domain crates: swap the Cent backing to i128.
  42. i128 = ["kuatia-types/i128", "kuatia-storage/i128"]