-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
86 lines (73 loc) · 2.26 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
[package]
name = "actix-web-rust-embed-responder"
version = "2.2.3"
edition = "2021"
description = "An actix-web responder for rust-embed that implements cache revalidation and compressed responses."
license = "MIT"
readme = "README.md"
[features]
default = ["support-rust-embed", "support-rust-embed-for-web"]
support-rust-embed = ["rust-embed", "base64"]
support-rust-embed-for-web = ["rust-embed-for-web"]
# testing only, please ignore!
always-embed = ["rust-embed-for-web/always-embed"]
[dependencies]
actix-web = "4.4"
futures-core = "0.3"
lazy_static = "1.4" # static caching stuff
regex = "1.9" # parsing header values
flate2 = "1.0" # gzip compressed responses when doing on-the-fly compression
brotli = "6.0" # br compressed responses when doing on-the-fly compression
chrono = { version = "0.4", default-features = false, features = [
"clock",
] } # Parsing & serializing Last-Modified headers
# rust-embed only
rust-embed = { version = "8.0", optional = true }
base64 = { version = "0.21", optional = true } # ETag
# rust-embed-for-web only
rust-embed-for-web = { version = "11.1.1", optional = true }
[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
tokio = { version = "1", features = ["rt"] }
actix-http = "3.4"
#
# Example programs
#
[[example]]
name = "rust_embed"
path = "examples/rust_embed.rs"
required-features = ["support-rust-embed"]
[[example]]
name = "rust_embed_for_web"
path = "examples/rust_embed_for_web.rs"
required-features = ["support-rust-embed-for-web"]
#
# Benchmarks
#
[[bench]]
# Benchmark for getting a single HTML page.
name = "html_page"
harness = false
[[bench]]
# Benchmark for getting an image file, a much larger file than the HTML page benchmark.
name = "image"
harness = false
[[bench]]
# Benchmark for getting a single HTML page, with compression.
name = "html_page_with_compression"
harness = false
[[bench]]
# Benchmark for cached responses only.
name = "cached"
harness = false
[[bench]]
# Benchmark for a mixed of cached and non-cached responses, some with and some without compression.
name = "mix"
harness = false
#
# Tests. Not all tests are listed here, only ones that require special options.
#
[[test]]
name = "compression-options"
path = "tests/compression-options.rs"
required-features = ["always-embed"]