Added MultipartFile extractors.

Moved cfg macro to lib where possible.

Changed some features, and made some deps optional
This commit is contained in:
Martin Berg Alstad
2024-06-30 20:16:17 +02:00
parent e0baff8625
commit 0898a50166
17 changed files with 287 additions and 55 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "lib"
version = "1.1.1"
version = "1.3.0"
edition = "2021"
authors = ["Martin Berg Alstad"]
@ -8,15 +8,17 @@ authors = ["Martin Berg Alstad"]
[dependencies]
# Api
axum = { version = "0.7.5", optional = true }
axum = { version = "0.7.5", optional = true, features = ["multipart"] }
tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.5.2", optional = true, features = ["trace", "cors", "normalize-path"] }
# Async
tokio = { version = "1.38.0", optional = true, features = ["fs"] }
tokio-util = { version = "0.7.11", optional = true, features = ["io"] }
# Error handling
thiserror = { version = "1.0.61", optional = true }
# Logging
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tracing = { version = "0.1.40", optional = true }
tracing-subscriber = { version = "0.3.18", optional = true }
# Parsing
nom = { version = "7.1.3", optional = true }
# Serialization / Deserialization
@ -25,9 +27,10 @@ serde = { version = "1.0.203", optional = true, features = ["derive"] }
derive = { path = "derive", optional = true }
[features]
axum = ["dep:axum", "dep:tower", "dep:tower-http"]
tokio = ["dep:tokio", "dep:tokio-util"]
vec = []
axum = ["dep:axum", "dep:tower", "dep:tower-http", "dep:thiserror", "dep:tracing", "dep:tracing-subscriber"]
tokio = ["dep:tokio"]
io = ["dep:tokio", "dep:tokio-util"]
iter = []
nom = ["dep:nom"]
serde = ["dep:serde"]
derive = ["dep:derive", "axum", "serde"]