-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
170 lines (160 loc) · 6.87 KB
/
Copy pathCargo.toml
File metadata and controls
170 lines (160 loc) · 6.87 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[workspace]
members = [
"crates/edgezero-adapter-axum",
"crates/edgezero-adapter-cloudflare",
"crates/edgezero-adapter-fastly",
"crates/edgezero-adapter-spin",
"crates/edgezero-adapter",
"crates/edgezero-cli",
"crates/edgezero-core",
"crates/edgezero-macros",
]
exclude = ["examples/app-demo"]
resolver = "2"
[workspace.package]
edition = "2021"
version = "0.1.0"
authors = ["EdgeZero Team <dev@edgezero.dev>"]
license = "Apache-2.0"
[workspace.dependencies]
anyhow = "1"
async-compression = { version = "0.4", features = [
"futures-io",
"gzip",
"brotli",
] }
async-stream = "0.3"
async-trait = "0.1"
axum = { version = "0.8", default-features = true }
brotli = "8"
bytes = "1"
chrono = "0.4"
ctor = "1.0"
edgezero-adapter = { path = "crates/edgezero-adapter" }
edgezero-adapter-axum = { path = "crates/edgezero-adapter-axum", default-features = false }
edgezero-adapter-cloudflare = { path = "crates/edgezero-adapter-cloudflare", default-features = false }
edgezero-adapter-fastly = { path = "crates/edgezero-adapter-fastly", default-features = false }
edgezero-adapter-spin = { path = "crates/edgezero-adapter-spin", default-features = false }
edgezero-core = { path = "crates/edgezero-core", default-features = false }
edgezero-cli = { path = "crates/edgezero-cli", default-features = false }
fastly = "0.12"
fern = "0.7"
flate2 = { version = "1", features = ["rust_backend"] }
futures = { version = "0.3", features = ["std", "executor"] }
futures-util = { version = "0.3", features = ["alloc", "io"] }
handlebars = "6"
http = "1"
http-body = "1"
http-body-util = "0.1"
log = "0.4"
log-fastly = "0.12"
matchit = "0.9"
once_cell = "1"
redb = "4.1.0"
reqwest = { version = "0.13", default-features = false, features = ["rustls", "blocking", "json"] }
# `bundled` ships SQLite source so operators don't need a system
# `libsqlite3-sys` install. Used by `edgezero-adapter-spin`'s CLI-only
# `config push --adapter spin` writer to write into Spin's local KV
# file (`<spin.toml dir>/.spin/sqlite_key_value.db`) using the schema
# vendored from spinframework/spin's `crates/key-value-spin/src/store.rs`.
rusqlite = { version = "0.32", default-features = false, features = ["bundled"] }
ryu = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_path_to_error = "0.1"
serde_urlencoded = "0.7"
sha2 = "0.10"
similar = "2"
simple_logger = "5"
proc-macro2 = { version = "1", features = ["span-locations"] }
quote = "1"
syn = { version = "2", features = ["full", "extra-traits", "visit"] }
subtle = "2"
# Pinned to the `~6.0` range (allows 6.0.x, blocks 6.1+) so a minor
# bump that touches `key_value::Store::open`'s async signature or the
# wasi-http import surface fails at build time rather than at `spin
# up` (where a runtime mismatch surfaces as opaque WIT linker errors).
spin-sdk = { version = "~6.0", default-features = false, features = ["http", "key-value", "variables"] }
tempfile = "3"
toml_edit = "0.25"
thiserror = "2"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "signal"] }
trybuild = "1"
toml = { version = "1.1" }
tower = { version = "0.5", features = ["util"] }
tower-layer = "0.3"
tower-service = "0.3"
tracing = "0.1"
validator = { version = "0.20", features = ["derive"] }
walkdir = { version = "2" }
web-time = "1"
worker = { version = "0.8", features = ["http"] }
[workspace.lints.clippy]
# Same strict gate as the demo workspace. Allow-list mirrors the demo's
# slim set; every additional exception lives at the call site as a
# documented `#[allow]` or `#[expect]` rather than a workspace allow.
pedantic = { level = "warn", priority = -1 }
restriction = { level = "deny", priority = -1 }
# Meta — required when enabling `restriction` as a group.
blanket_clippy_restriction_lints = "allow"
# Documentation — private items don't need full docs.
missing_docs_in_private_items = "allow"
# Style / formatting — match idiomatic Rust conventions.
implicit_return = "allow"
question_mark_used = "allow"
single_call_fn = "allow"
separated_literal_suffix = "allow"
# `pub_with_shorthand` flags the shorthand `pub(crate)` form and wants the
# longhand `pub(in crate)` form. Verified by removing this allow on
# clippy 1.95: 6 errors of the form
#
# error: usage of `pub` without `in`
# | pub(crate) fn decompress_body(...)
# | ^^^^^^^^^^ help: add it: `pub(in crate)`
# = help: ...index.html#pub_with_shorthand
#
# So the lint flags `pub(crate)` and suggests `pub(in crate)`. We use
# `pub(crate)` because rustfmt unconditionally rewrites `pub(in crate)`
# → `pub(crate)` on save; no spelling satisfies both clippy and rustfmt.
# Six legitimate cross-file `pub(crate)` items currently fire:
# dispatch_raw, dispatch_with_store_names, parse_uri, parse_client_addr,
# decompress_body, and one extra in fastly/request.rs.
pub_with_shorthand = "allow"
# `module_name_repetitions` was attempted: 39 sites in edgezero-core,
# centred on three concrete blockers that surfaced during the rename:
# 1. `proxy::Request`/`proxy::Response` would collide with the
# `http::Request`/`http::Response` already imported by every
# consumer; the only viable alternative names (`OutboundRequest`,
# `Outbound`) are strictly more verbose than `ProxyRequest`.
# 2. `manifest.rs` has 17 `Manifest*` types; consumers in adapters,
# cli, demos, scaffold templates, and the macro-generated app
# code use these names directly. Stripping the prefix would force
# every site to write `use edgezero_core::manifest::Spec as Manifest`
# etc. — pure churn for no readability gain since `manifest::Spec`
# reads worse than `Manifest`.
# 3. The macro `#[app]` emits code that references these names by
# their current spelling; renaming requires regenerating every
# generated app with new types and updating CLAUDE.md examples.
# Net: the lint's intent (Rust ecosystem `module::Type` idiom) is
# real, but it conflicts with our flat re-export surface and several
# names cannot be deprefixed without losing meaning.
module_name_repetitions = "allow"
# `pattern_type_mismatch` and `ref_patterns` are mutually exclusive in modern
# Rust — every `if let Some(x) = &foo` flags the first, every
# `*foo { Variant(ref x) => ... }` flags the second. We pick match-ergonomics.
pattern_type_mismatch = "allow"
# API design — `exhaustive_structs` fires on the unit struct generated by
# `edgezero_core::app!`.
exhaustive_structs = "allow"
# Only one site triggers `exhaustive_enums` workspace-wide: `Body { Once,
# Stream }`. Marking it `#[non_exhaustive]` would force a wildcard arm
# (`_ => unreachable!()`) at every external `match` site — 37 of them
# across the four adapter crates — and a third Body variant would
# silently panic at runtime instead of producing a compile error.
# Body is intentionally a closed enum.
exhaustive_enums = "allow"
# Imports / paths
std_instead_of_alloc = "allow"
std_instead_of_core = "allow"
[workspace.lints.rust]
unsafe_code = "deny"