-
Notifications
You must be signed in to change notification settings - Fork 4
/
Cargo.toml
135 lines (121 loc) · 3.22 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
[workspace]
members = ["preroll-example"]
[package]
name = "preroll"
version = "0.10.1"
authors = ["Jeremiah Senkpiel <[email protected]>"]
edition = "2021"
license = "BlueOak-1.0.0"
description = "Easy boilerplate utilities for Rust http services which use async-std, Tide, Surf, and friends."
readme = "README.md"
repository = "https://github.com/eaze/preroll"
keywords = ["tide", "surf", "sqlx", "honeycomb"]
categories = ["web-programming::http-server"]
[package.metadata.docs.rs]
features = ["docs"]
rustdoc-args = ["--cfg", "docsrs"]
[features]
docs = ["all"]
test = []
lambda-http = ["tide-lambda-listener"]
custom_middleware = []
## Add-ons
all = ["honeycomb", "postgres"] # All add-ons
honeycomb = ["_beeline", "_tracing", "libhoney-rust"]
_beeline = ["base64", "thiserror"]
_tracing = [
"tracing",
"tracing-futures",
"tracing-honeycomb",
"tracing-subscriber"
]
postgres = ["sqlx", "tide-sqlx"]
## Internal features
panic-on-error = []
[dependencies]
anyhow = "1.0"
cfg-if = "1.0"
chrono = { version = "0.4", features = ["serde"] }
color-eyre = "0.5"
dotenv = "0.15"
env_logger = "0.9"
gethostname = "0.2"
kv-log-macro = "1.0"
lazy_static = "1.4"
log = "0.4"
once_cell = "1.5"
petname = { version = "1.1.2", default-features = false, features = [
"std_rng",
"default_dictionary"
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tide = { version = "0.16", default-features = false, features = ["h1-server"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
## feature = tracing
# stuff copied from the unpublished beeline-rust
base64 = { version = "0.13", optional = true }
thiserror = { version = "1.0", optional = true }
tracing-honeycomb = { version = "0.4", optional = true }
libhoney-rust = { version = "0.1.4", optional = true }
[dependencies.async-std]
version = "1.8"
default-features = false
features = [
"attributes",
# Defaults, minus gloo-timers.
"std",
"async-global-executor",
"async-io",
"futures-lite",
"kv-log-macro",
"log",
"num_cpus",
"pin-project-lite",
]
[dependencies.http-client]
version = "6.5.1"
default-features = false
features = ["h1_client", "rustls"]
[dependencies.surf]
version = "2.3"
default-features = false
features = ["h1-client-rustls", "encoding"]
[dependencies.tide-lambda-listener]
version = "0.1.3"
optional = true
## feature = postgres
[dependencies.sqlx]
version = "0.5"
optional = true
features = ["runtime-async-std-rustls", "postgres", "json", "chrono", "uuid"]
[dependencies.tide-sqlx]
version = "0.6"
optional = true
default-features = false
features = ["rustls", "postgres", "tracing"]
# default-features = false
# features = ["runtime-async-std"]
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.tracing-futures]
version = "0.2"
optional = true
[dependencies.tracing-subscriber]
version = "0.3"
optional = true
default-features = false
features = ["env-filter", "registry"]
# Dev-deps
[dev-dependencies.cargo-husky]
version = "1"
default-features = false
features = ["user-hooks"]
# Dependency overrides
# [patch.crates-io.libhoney-rust]
# git = "https://github.com/eaze/libhoney-rust.git"
# branch = "runtime-async-std"
# optional = true
# default-features = false
# features = ["runtime-async-std"]