[package]
edition = "2024"
rust-version = "1.96"
name = "entity-derive"
version = "0.22.8"
authors = ["RAprogramm <andrey.rozanov.vl@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Derive macro for generating DTOs, repositories, and SQL from a single entity definition"
documentation = "https://docs.rs/entity-derive"
readme = "README.md"
keywords = [
"derive",
"macro",
"entity",
"dto",
"repository",
]
categories = [
"development-tools::procedural-macro-helpers",
"database",
]
license = "MIT"
repository = "https://github.com/RAprogramm/entity-derive"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
aggregate_root = ["entity-derive-impl/aggregate_root"]
api = [
"entity-derive-impl/api",
"dep:masterror",
"dep:serde_json",
]
clickhouse = ["entity-core/clickhouse"]
commands = ["entity-derive-impl/commands"]
default = [
"postgres",
"events",
"commands",
"hooks",
"transactions",
"aggregate_root",
"migrations",
"projections",
]
events = ["entity-derive-impl/events"]
garde = ["entity-derive-impl/garde"]
hooks = ["entity-derive-impl/hooks"]
migrations = ["entity-derive-impl/migrations"]
mongodb = ["entity-core/mongodb"]
outbox = [
"entity-core/outbox",
"events",
"entity-derive-impl/outbox",
"dep:serde_json",
]
postgres = [
"entity-core/postgres",
"entity-derive-impl/postgres",
]
projections = ["entity-derive-impl/projections"]
streams = [
"entity-core/streams",
"events",
"entity-derive-impl/streams",
"dep:serde_json",
]
tracing = [
"entity-core/tracing",
"entity-derive-impl/tracing",
]
transactions = ["entity-derive-impl/transactions"]
validate = ["entity-derive-impl/validate"]
[lib]
name = "entity_derive"
path = "src/lib.rs"
[[test]]
name = "garde"
path = "tests/garde.rs"
[[test]]
name = "integration"
path = "tests/integration.rs"
[[test]]
name = "postgres"
path = "tests/postgres.rs"
[[test]]
name = "streams"
path = "tests/streams.rs"
[dependencies.entity-core]
version = "0.10"
features = ["serde"]
[dependencies.entity-derive-impl]
version = "0.20"
default-features = false
[dependencies.masterror]
version = "0.29"
features = [
"axum",
"openapi",
]
optional = true
[dependencies.serde_json]
version = "1"
optional = true
[dev-dependencies.async-trait]
version = "0.1"
[dev-dependencies.axum]
version = "0.8"
[dev-dependencies.chrono]
version = "0.4"
features = ["serde"]
[dev-dependencies.garde]
version = "0.23"
features = [
"derive",
"email",
"url",
]
[dev-dependencies.masterror]
version = "0.29"
features = [
"axum",
"openapi",
]
[dev-dependencies.serde]
version = "1"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.sqlx]
version = "0.9"
features = [
"runtime-tokio",
"postgres",
"uuid",
"chrono",
"derive",
]
[dev-dependencies.tokio]
version = "1"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.tower]
version = "0.5"
features = ["util"]
[dev-dependencies.tracing]
version = "0.1"
[dev-dependencies.trybuild]
version = "1"
[dev-dependencies.utoipa]
version = "5"
features = [
"chrono",
"uuid",
]
[dev-dependencies.uuid]
version = "1"
features = [
"v4",
"v7",
"serde",
]
[dev-dependencies.validator]
version = "0.20"
features = ["derive"]
[lints.clippy]
doc_markdown = "allow"
format_push_string = "allow"
match_same_arms = "allow"
needless_continue = "allow"
needless_pass_by_value = "allow"
option_option = "allow"
struct_excessive_bools = "allow"
too_many_lines = "allow"
trivially_copy_pass_by_ref = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
unsafe_code = "deny"
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1