-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
135 lines (119 loc) · 3.7 KB
/
Cargo.toml
File metadata and controls
135 lines (119 loc) · 3.7 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
[package]
name = "monolith"
version = "2.11.0"
edition = "2021"
authors = [
"Sunshine <snshn@tutanota.com>",
"Mahdi Robatipoor <mahdi.robatipoor@gmail.com>",
"Emmanuel Delaborde <th3rac25@gmail.com>",
"Emi Simpson <emi@alchemi.dev>",
"rhysd <lin90162@yahoo.co.jp>",
"Andriy Rakhnin <a@rakhnin.com>",
]
description = "CLI tool and library for saving web pages as a single HTML file"
homepage = "https://github.com/Y2Z/monolith"
repository = "https://github.com/Y2Z/monolith"
readme = "README.md"
license = "CC0-1.0"
keywords = ["web", "http", "html", "download", "command-line"]
categories = ["command-line-utilities", "web-programming"]
include = ["src/*.rs", "Cargo.toml"]
[features]
default = ["cli"]
cli = ["clap", "tempfile"]
web = [
"axum",
"tower-http",
"tokio",
"serde",
"serde_json",
"tracing",
"tracing-subscriber",
"futures",
"zip",
]
translation = [
"markdown-translator",
"serde",
"serde_json",
"tokio",
"tracing",
"thiserror",
"blake3",
"toml",
"config",
"shellexpand",
"lru",
"dashmap",
"futures",
"rayon",
"tower",
"metrics",
"dotenv",
]
vendored-openssl = ["openssl/vendored"]
[dependencies]
# Core dependencies (always included)
atty = "0.2.14"
base64 = "0.22.1"
chrono = { version = "0.4.41", features = ["serde"] }
cssparser = "0.35.0"
encoding_rs = "0.8.35"
html5ever = "0.29.1"
markup5ever_rcdom = "0.5.0-unofficial"
# 使用系统OpenSSL,不使用vendored特性以加快编译速度
openssl = "0.10.72"
percent-encoding = "2.3.1"
redb = "2.4.0"
sha2 = "0.10.9"
url = "2.5.4"
uuid = { version = "1.0", features = ["v4", "v5"] }
# Regex with optimized features
regex = { version = "1.11.1", default-features = false, features = ["std", "perf-dfa", "unicode-perl"] }
# HTTP client with compression support
reqwest = { version = "0.12.15", default-features = false, features = ["default-tls", "blocking", "gzip", "brotli", "deflate"] }
# URL encoding/decoding
urlencoding = "2.1.3"
# CLI dependencies (optional)
clap = { version = "4.5.37", features = ["derive"], optional = true }
tempfile = { version = "3.19.1", optional = true }
# Web server dependencies (optional)
axum = { version = "0.7", optional = true }
tower-http = { version = "0.5", features = ["fs", "cors"], optional = true }
tower = { version = "0.4", optional = true }
tokio = { version = "1.0", features = ["rt-multi-thread", "macros"], optional = true }
futures = { version = "0.3", optional = true }
# MongoDB 依赖已移除 - 轻量化版本不再使用数据库
# Translation dependencies (optional)
markdown-translator = { version = "0.1.1", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
toml = { version = "0.9", optional = true }
config = { version = "0.14", optional = true }
thiserror = { version = "1.0", optional = true }
blake3 = { version = "1.0", optional = true }
shellexpand = { version = "3.1", optional = true }
dotenv = { version = "0.15", optional = true }
# Concurrency and caching dependencies (optional)
rayon = { version = "1.8", optional = true }
dashmap = { version = "5.5", optional = true }
lru = { version = "0.12", optional = true }
# Logging dependencies (optional)
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", optional = true }
metrics = { version = "0.22", optional = true }
# Archive dependencies (optional)
zip = { version = "0.6", optional = true }
[dev-dependencies]
assert_cmd = "2.0.17"
[lib]
name = "monolith"
path = "src/lib.rs"
[[bin]]
name = "monolith"
path = "src/main.rs"
required-features = ["cli"]
[[bin]]
name = "monolith-web"
path = "src/web_main.rs"
required-features = ["web"]