Files

81 lines
2.4 KiB
TOML
Raw Permalink Normal View History

2025-01-26 14:00:27 +01:00
[workspace]
members = [
".",
"georm-macros",
"examples/postgres/*"
]
2025-01-26 14:00:27 +01:00
[workspace.package]
2025-06-10 12:13:26 +02:00
version = "0.2.1"
2025-06-07 12:57:28 +02:00
edition = "2024"
2025-01-26 14:00:27 +01:00
authors = ["Lucien Cartier-Tilet <lucien@phundrak.com>"]
homepage = "https://github.com/Phundrak/georm"
repository = "https://github.com/Phundrak/georm"
2025-01-26 14:00:27 +01:00
license = "MIT OR GPL-3.0-or-later"
keywords = ["sqlx", "orm", "postgres", "postgresql", "database", "async"]
categories = ["database"]
[package]
name = "georm"
readme = "README.md"
description = "Georm, a simple, opiniated SQLx ORM for PostgreSQL and SQLite"
2025-01-26 14:00:27 +01:00
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
version.workspace = true
[features]
default = ["postgres"]
postgres = ["georm-macros/postgres", "sqlx/postgres", "sqlx/bigdecimal"]
sqlite = ["georm-macros/sqlite", "sqlx/sqlite"]
2025-01-26 14:00:27 +01:00
[workspace.dependencies]
2025-06-10 12:13:26 +02:00
georm-macros = { version = "=0.2.1", path = "georm-macros" }
2025-01-26 14:00:27 +01:00
[workspace.dependencies.sqlx]
2025-06-07 12:57:28 +02:00
version = "0.8.6"
2025-01-26 14:00:27 +01:00
default-features = false
features = ["runtime-tokio", "macros", "migrate"]
2025-01-26 14:00:27 +01:00
[dependencies]
sqlx = { workspace = true }
georm-macros = { workspace = true }
[dev-dependencies]
chrono = { version = "0.4", features = ["serde"] }
rand = "0.9"
[dev-dependencies.sqlx]
# Unlike the crate's own [features] above, dev-dependencies are always built
# for `cargo test` regardless of --no-default-features/--features passed for
# the georm package itself. Tests bind directly to sqlx::PgPool/SqlitePool,
# so both drivers must be enabled here unconditionally.
version = "0.8.6"
default-features = false
features = ["postgres", "sqlite", "runtime-tokio", "macros", "migrate", "chrono", "bigdecimal"]
# Cargo's test auto-discovery only scans tests/*.rs (not subdirectories), so
# the tests/sqlite/*.rs files (kept in their own directory to avoid colliding
# with the postgres tests/models.rs module) need explicit [[test]] entries.
[[test]]
name = "sqlite_simple_struct"
path = "tests/sqlite/simple_struct.rs"
[[test]]
name = "sqlite_defaultable_struct"
path = "tests/sqlite/defaultable_struct.rs"
# sqlite_composite_key intentionally deferred: UserRole's chrono::DateTime<Utc>
# column needs per-field query_as! type overrides under SQLite (see the note
# in tests/sqlite/models.rs) that don't exist yet.
2025-01-26 14:00:27 +01:00
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
all = "deny"
pendantic = "deny"
nursery = "deny"