protify 0.1.0

A Rust-first protobuf framework to generate packages from rust code, with validation included
Documentation
[package]
name = "protify"
version = "0.1.0"
description = "A Rust-first protobuf framework to generate packages from rust code, with validation included"
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
keywords.workspace = true

[lints]
workspace = true

[package.metadata.release]
tag = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dev-dependencies]
indoc = { workspace = true }
protify-build = { path = "../protify-build" }
maplit = "1"
tonic-prost-build = { workspace = true }
diesel = { workspace = true }
proto-types = { workspace = true, features = [
  "protovalidate",
  "diesel-sqlite",
] }

[dependencies]
bool-enum = { workspace = true }
regex = { version = "1", optional = true, default-features = false, features = [
  "perf",
  "unicode",
] }
cel = { workspace = true, optional = true }
serde = { version = "1", optional = true, default-features = false, features = [
  "derive",
  "rc",
] }
serde_json = { version = "1", optional = true, default-features = false }

ordered-float = { version = "5", default-features = false }
proto-types = { workspace = true, features = ["protovalidate"] }
paste = "1"
bytes = { version = "1", default-features = false }
askama = { workspace = true, optional = true }
thiserror = { version = "2", default-features = false }
log = "0.4"
owo-colors = { version = "4" }
inventory = { version = "0.3", optional = true }
ordermap = { version = "1", default-features = false }
similar-asserts = { version = "1" }
float_eq = { version = "1", default-features = false }
protify-proc-macro = { version = "0.1.0", path = "../protify-proc-macro/", default-features = false }
ipnet = { version = "2", default-features = false }
fluent-uri = { version = "0.4", default-features = false }
hashbrown = "0.16"
once_cell = { version = "1.21", default-features = false, features = [
  "alloc",
  "race",
] }
chrono = { version = "0.4", default-features = false, features = [
  "alloc",
], optional = true }
tonic = { workspace = true, optional = true }
prost = { workspace = true }
document-features = { workspace = true, optional = true }
bon = { version = "3.8", default-features = false, features = ["alloc"] }

[features]
default = ["std", "regex", "cel", "chrono", "inventory"]

document-features = ["dep:document-features"]

## Enables direct conversion from validation errors to [`tonic::Status`].
tonic = ["dep:tonic"]

## Enables serde for all schema representations.
serde = [
  "dep:serde",
  "dep:serde_json",
  "bytes/serde",
  "proto-types/serde",
  "ordered-float/serde",
  "hashbrown/serde",
]

## Enables automatic collection for elements of a package. (Required `std`)
inventory = ["std", "dep:inventory"]

## Enables timestamp `now` features in CEL and timestamp validation.
chrono = ["proto-types/chrono", "dep:chrono"]

## Enables usage of wasmbind for chrono's `now` methods.
chrono-wasm = ["chrono", "chrono/wasmbind", "proto-types/chrono-wasm"]

## Enables the std library features.
std = [
  "dep:askama",
  "bon/std",
  "prost/std",
  "ordermap/std",
  "ordered-float/std",
  "regex?/std",
  "proto-types/std",
  "bytes/std",
  "askama/std",
  "thiserror/std",
  "float_eq/std",
  "fluent-uri/std",
  "ipnet/std",
  "chrono?/std",
  "chrono?/now",
  "serde?/std",
  "serde_json?/std",
]

## Enables schema features for `google.type` types.
common-types = ["proto-types/all_common"]
## Enables schema features for `google.rpc` types.
rpc-types = ["proto-types/rpc"]

## Enables usage with reflection, to generate validation logic from pre-built protos with protovalidate annotations.
reflection = ["protify-proc-macro/reflection"]

## Enables CEL validation.
cel = ["std", "dep:cel", "proto-types/cel", "protify-proc-macro/cel"]

## Enables regex-based validators.
regex = ["dep:regex"]