rust-lib/Cargo.toml

90 lines
3.0 KiB
TOML
Raw Normal View History

[workspace]
members = ["crates/*"]
2024-08-05 01:46:35 +02:00
exclude = ["examples"]
[workspace.package]
edition = "2024"
rust-version = "1.85"
2024-06-22 17:18:29 +02:00
authors = ["Martin Berg Alstad"]
homepage = "emberal.github.io"
2024-06-22 17:18:29 +02:00
[package]
name = "lib"
version = "1.5.0"
description = "A library with utilities and helper fuctions."
edition = { workspace = true }
rust-version = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
2024-06-22 17:18:29 +02:00
[lib]
[dependencies]
# Api
axum = { version = "0.8", optional = true, features = ["multipart"] }
tower = { version = "0.5", optional = true }
tower-http = { version = "0.6", optional = true, features = ["trace", "cors", "normalize-path"] }
2024-08-27 00:21:25 +02:00
mime = { version = "0.3", optional = true }
2024-06-22 17:18:29 +02:00
# Async
tokio = { workspace = true, optional = true, features = ["fs", "rt-multi-thread"] }
2024-07-17 13:02:09 +02:00
tokio-util = { version = "0.7", optional = true, features = ["io"] }
2024-08-19 19:40:14 +02:00
# Database
diesel = { workspace = true, optional = true, features = ["postgres"] }
diesel-async = { workspace = true, optional = true, features = ["postgres", "deadpool", "async-connection-wrapper"] }
2024-08-19 19:40:14 +02:00
diesel-crud-derive = { path = "crates/diesel_crud_derive", optional = true }
diesel-crud-trait = { path = "crates/diesel_crud_trait", optional = true }
diesel_migrations = { workspace = true, optional = true }
deadpool-diesel = { workspace = true, optional = true, features = ["postgres"] }
# Error handling
thiserror = { workspace = true, optional = true }
2024-06-26 10:20:52 +02:00
# Logging
2024-07-17 13:02:09 +02:00
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", optional = true }
2024-06-22 17:18:29 +02:00
# Parsing
nom = { version = "8.0", optional = true }
# Procedural macros
into-response-derive = { path = "crates/into_response_derive", optional = true }
read-files = { path = "crates/read_files", optional = true }
2024-06-22 17:18:29 +02:00
# Serialization / Deserialization
2024-07-17 13:02:09 +02:00
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
# Test
testcontainers-modules = { workspace = true, features = ["postgres"], optional = true }
# Time
chrono = { version = "0.4", optional = true, features = ["serde"] }
# Utils
derive_more = { workspace = true, features = ["from", "constructor"] }
[workspace.dependencies]
# Async
tokio = "1.40"
# Database
diesel = "2.2"
diesel-async = "0.5"
diesel_migrations = "2.2"
deadpool-diesel = "0.6"
# Error handling
thiserror = "2.0"
# Procedural macros
2024-07-17 13:02:09 +02:00
syn = "2.0"
quote = "1.0"
2024-08-19 19:40:14 +02:00
deluxe = "0.5"
proc-macro2 = "1.0"
# Test
testcontainers-modules = "0.11"
# Utils
derive_more = "2.0"
regex = "1.11"
2024-06-22 17:18:29 +02:00
[features]
2024-08-27 00:04:21 +02:00
axum = ["dep:axum", "dep:tower", "dep:tower-http", "dep:thiserror", "dep:tracing", "dep:tracing-subscriber", "dep:tokio", "dep:mime"]
diesel = ["dep:diesel-crud-trait", "dep:diesel", "dep:diesel-async", "dep:deadpool-diesel", "dep:diesel_migrations"]
io = ["dep:tokio", "dep:tokio-util"]
iter = []
2024-06-22 17:18:29 +02:00
nom = ["dep:nom"]
serde = ["dep:serde", "dep:serde_json"]
2024-08-19 19:40:14 +02:00
derive = ["dep:into-response-derive", "dep:diesel-crud-derive"]
read-files = ["dep:read-files"]
time = ["dep:chrono"]
test = ["dep:testcontainers-modules"]