-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
106 lines (89 loc) · 2.61 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
[package]
name = "deeplx"
version = "1.3.3"
edition = "2021"
authors = [
"Homing So <[email protected]>"
]
description = "A Rust package for unlimited DeepL translation"
license = "MIT"
readme = "README.md"
repository = "https://github.com/hominsu/deeplx-rs"
keywords = ["deeplx", "translation"]
categories = ["text-processing", "internationalization"]
exclude = ["configs", "deploy", ".*"]
[profile.release]
opt-level = 3
strip = true
lto = true
codegen-units = 1
panic = "abort"
[lib]
name = "deeplx"
path = "src/lib.rs"
[[bin]]
name = "deeplx"
path = "src/main.rs"
required-features = ["server"]
[features]
default = ["proxy", "server", "mimalloc"]
proxy = []
impersonate = ["dep:rquest"]
server = [
"dep:thiserror",
"dep:clap",
"dep:glob",
"dep:notify",
"dep:config",
"dep:tracing",
"dep:tracing-subscriber",
"dep:tokio",
"dep:tower-http",
"dep:axum",
"dep:axum-extra",
]
mimalloc = ["dep:mimalloc"]
rpmalloc = ["dep:rpmalloc"]
snmalloc = ["dep:snmalloc-rs"]
tikv-jemallocator = ["dep:tikv-jemallocator"]
[package.metadata.docs.rs]
all-features = true
[dependencies]
# data processing
bytes = "1.9"
rand = "0.9"
chrono = "0.4"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# internationalization & language detection
isolang = { version = "2.4.0" }
whatlang = { version = "0.16" }
# http client
reqwest = { version = "0.12", features = ["gzip", "brotli", "json"] }
rquest = { version = "2", optional = true, features = ["gzip", "brotli", "json"] }
# memory allocator
mimalloc = { version = "0.1", optional = true }
rpmalloc = { version = "0.2", optional = true }
snmalloc-rs = { version = "0.3", optional = true }
tikv-jemallocator = { version = "0.6", optional = true }
# error handling
thiserror = { version = "2", optional = true }
# cli
clap = { version = "4.5", optional = true, features = ["derive", "env"] }
# hot reload config
glob = { version = "0.3", optional = true }
notify = { version = "8.0.0", optional = true }
config = { version = "0.15", optional = true, features = ["ini", "json", "yaml", "toml", "ron", "json5"] }
# logging & tracing
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", optional = true, features = ["env-filter"] }
# async runtime
tokio = { version = "1", optional = true, features = ["full"] }
# web stuff
tower-http = { version = "0.6", optional = true, features = ["trace"] }
axum = { version = "0.8", optional = true, features = ["tracing", "macros"] }
axum-extra = { version = "0.10", optional = true, features = ["typed-header"] }
[dev-dependencies]
lazy_static = { version = "1" }
[[test]]
name = "translate"