[package]
name = "nanoservices-utils"
version = "0.2.1"
edition = "2021"
authors = ["Maxwell Flitton", "Caroline Morton"]
description = "A collection of utilities for nanoservices"
license = "MIT"
[dependencies]
serde = { version = "1.0.197", features = ["derive"] }
thiserror = "2.0.6"
chrono = { version = "0.4.39", features = ["serde"] }
futures = "0.3.31"
paste = "1.0.15"
actix-web = { version = "4.9.0", optional = true }
rocket = { version = "0.5.1", features = ["json"], optional = true }
axum = { version = "0.8.1", optional = true }
hyper = { version = "1.5.1", features = ["full"], optional = true}
serde_json = { version = "1.0.128", optional = true }
http-body-util = { version = "0.1.1", optional = true }
jsonwebtoken = { version = "9.3.0", optional = true }
bitcode = { version = "0.6.0", optional = false }
bincode = { version = "1.3.3", optional = true }
revision = { version = "0.10.0", optional = false }
tokio-util = { version = "0.7", features = ["codec"], optional = true }
bytes = { version = "1.6.0", optional = true }
tokio = { version = "1.37.0", optional = true }
nan-serve-dal-tx-impl = { version = "0.1.1", optional = true }
sqlx = { version = "0.8.2", features = ["postgres", "json", "runtime-tokio"], optional = true }
ctor = { version = "0.2.9", optional = true }
nan-serve-publish-event = { version = "0.1.0", optional = true }
nan-serve-event-subscriber = { version = "0.1.0", optional = true }
schemars = { version = "0.8", optional = true }
[dev-dependencies]
tokio = { version = "1.37.0", features = ["full"] }
[features]
actix = ["dep:actix-web"]
rocket = ["dep:rocket"]
axum = ["dep:axum"]
hyper = ["dep:hyper", "dep:serde_json", "dep:http-body-util"]
networking = ["dep:bincode", "dep:tokio-util", "dep:bytes"]
tcp-messaging = ["tokio/full", "networking"]
wasm-messaging = ["tokio/sync", "tokio/macros", "tokio/io-util", "tokio/rt", "tokio/time", "networking"]
jwt = ["dep:jsonwebtoken"]
dal = ["dep:nan-serve-dal-tx-impl"]
dal-postgres = ["dal", "dep:sqlx"]
tokio-pub-sub = ["dep:ctor", "dep:bincode", "dep:nan-serve-publish-event", "dep:nan-serve-event-subscriber"]
code-gen = ["dep:schemars", "dep:serde_json"]
full = [
"hyper",
"axum",
"actix",
"rocket",
"networking",
"tcp-messaging",
"wasm-messaging",
"jwt",
"dal",
"tokio-pub-sub",
"code-gen"
]