-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCargo.toml
More file actions
185 lines (174 loc) · 5.31 KB
/
Cargo.toml
File metadata and controls
185 lines (174 loc) · 5.31 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[workspace]
resolver = "2"
members = [
"crates/types",
"crates/daemon",
"crates/config",
"crates/store",
"crates/auth",
"crates/translate",
"crates/provider",
"crates/proto",
"crates/proxy",
"crates/ampcode",
]
exclude = ["desktop/src-tauri"]
[workspace.package]
edition = "2024"
version = "1.2.0"
authors = ["AprilNEA <github@sku.moe>"]
description = "Bring Your Own Keys — AI subscription-to-API proxy gateway"
license = "MIT OR Apache-2.0"
repository = "https://github.com/AprilNEA/BYOKEY"
homepage = "https://github.com/AprilNEA/BYOKEY"
keywords = ["ai", "proxy", "openai", "claude", "llm"]
categories = ["web-programming::http-server", "network-programming"]
readme = "README.md"
[workspace.dependencies]
# Workspace crates
byokey-types = { version = "1.2.0", path = "crates/types" }
byokey-config = { version = "1.2.0", path = "crates/config" }
byokey-store = { version = "1.2.0", path = "crates/store" }
byokey-auth = { version = "1.2.0", path = "crates/auth" }
byokey-translate = { version = "1.2.0", path = "crates/translate" }
byokey-provider = { version = "1.2.0", path = "crates/provider" }
byokey-proto = { version = "1.2.0", path = "crates/proto" }
byokey-proxy = { version = "1.2.0", path = "crates/proxy" }
byokey-daemon = { version = "1.2.0", path = "crates/daemon" }
ampcode = { version = "0.1.1", path = "crates/ampcode" }
loadwise-core = "0.1.0"
aigw = { version = "0.4.0", default-features = false, features = ["anthropic", "anthropic-claude-code", "openai", "openai-compat"] }
aigw-core = "0.4.0"
aigw-openai = "0.4.0"
reqwest = { version = "0.12", default-features = false }
secrecy = "0.10"
# Async runtime
tokio = { version = "1", features = ["full"] }
# Socket activation (systemfd dev loop, systemd/launchd LISTEN_FDS)
listenfd = "1"
# HTTP
axum = { version = "0.8", features = ["macros"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "request-id"] }
rquest = { version = "5", features = ["full"] }
eventsource-stream = "0.2"
# Serde
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Error
thiserror = "2"
anyhow = "1"
# Config & hot reload
figment = { version = "0.10", features = ["yaml", "json", "env"] }
notify = "7"
arc-swap = "1"
# Auth
oauth2 = "5"
rand = { version = "0.8", features = ["std"] }
uuid = { version = "1", features = ["v4", "v5"] }
sha2 = "0.10"
base64 = "0.22"
open = "5"
# Storage
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
sea-orm = { version = "2.0.0-rc.38", features = ["sqlx-sqlite", "runtime-tokio-rustls", "macros"] }
sea-orm-migration = { version = "2.0.0-rc.38", default-features = false, features = ["sqlx-sqlite", "runtime-tokio-rustls"] }
# Token counting
tiktoken-rs = "0.6"
# JSON path
jsonptr = "0.4"
# Async trait
async-trait = "0.1"
# Builder
bon = "3"
# URL encoding
serde_urlencoded = "0.7"
# CLI
clap = { version = "4", features = ["derive"] }
clap_complete = "4"
# Regex (used by amp patch)
regex = "1"
# RPC
tarpc = { version = "0.37", features = ["tokio1", "serde-transport", "unix", "serde-transport-json"] }
tokio-util = { version = "0.7", features = ["codec"] }
# Futures
futures = "0.3"
futures-core = "0.3"
futures-util = "0.3"
tokio-stream = "0.1"
bytes = "1"
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] }
http = "1"
# Observability
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "fmt"] }
tracing-appender = "0.2"
sentry = { version = "0.47", default-features = false, features = [
"backtrace",
"contexts",
"debug-images",
"panic",
"reqwest",
"rustls",
"tracing",
"anyhow",
"tower",
"tower-http",
] }
# OpenAPI
utoipa = "5"
# ConnectRPC (Rust server, buffa-based protobuf)
connectrpc = { version = "0.3", default-features = false, features = ["axum", "gzip"] }
connectrpc-build = "0.3"
buffa = "0.3"
buffa-types = { version = "0.3", features = ["json"] }
http-body = "1"
[workspace.lints.rust]
unsafe_code = "forbid"
[workspace.lints.clippy]
pedantic = "warn"
# ── Root package (cargo install byokey) ──────────────────────────────────────
[package]
name = "byokey"
version.workspace = true
edition.workspace = true
authors.workspace = true
description.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
readme.workspace = true
[[bin]]
name = "byokey"
path = "src/main.rs"
[profile.release]
# line-tables-only keeps the binary small while giving Sentry enough
# information to symbolicate stack traces after sentry-cli debug-files upload.
debug = "line-tables-only"
[dependencies]
byokey-proxy.workspace = true
byokey-config.workspace = true
byokey-auth.workspace = true
byokey-store.workspace = true
byokey-types.workspace = true
byokey-daemon.workspace = true
axum.workspace = true
clap.workspace = true
clap_complete.workspace = true
anyhow.workspace = true
tokio.workspace = true
listenfd = { workspace = true }
arc-swap.workspace = true
rquest.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-appender.workspace = true
sentry.workspace = true
tarpc.workspace = true
tokio-util.workspace = true
futures-util.workspace = true
serde_json.workspace = true
regex.workspace = true
utoipa.workspace = true