-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
97 lines (86 loc) · 3.1 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
[package]
name = "polyproto"
version = "0.10.0"
edition = "2024"
license = "MPL-2.0"
description = "(Generic) Rust types and traits to quickly get a polyproto implementation up and running"
repository = "https://github.com/polyphony-chat/polyproto"
rust-version = "1.85.0"
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["types", "serde", "gateway", "tokio/net"]
wasm = ["getrandom", "getrandom/js", "dep:ws_stream_wasm"]
getrandom = ["dep:getrandom"]
types = ["dep:http"]
reqwest = ["dep:reqwest", "types", "serde"]
serde = ["dep:serde", "serde_json", "serde_with", "url/serde"]
serde_with = ["dep:serde_with"]
serde_json = ["dep:serde_json"]
gateway = ["serde", "types"]
_wasm_bindgen = ["wasm", "dep:wasm-bindgen", "dep:js-sys", "dep:wee_alloc"]
__no_wee_alloc = []
[dependencies]
der = { version = "0.7.9", features = ["pem"] }
getrandom = { version = "0.2.15", optional = true }
regex = "1.11.1"
reqwest = { version = "0.12.15", features = [
"json",
"zstd",
"rustls-tls-webpki-roots",
"charset",
"http2",
"macos-system-configuration",
"multipart",
], optional = true, default-features = false }
serde = { version = "1.0.219", optional = true, features = ["derive"] }
serde_json = { version = "1.0.140", optional = true }
spki = { version = "0.7.3", features = ["pem"] }
thiserror = "2.0.12"
x509-cert = "0.2.5"
log = "0.4.27"
url = { version = "2.5.4" }
http = { version = "1.3.1", optional = true }
serde_with = { version = "3.12.0", optional = true }
hex = "0.4.3"
tokio = { version = "1.44.1", features = ["macros", "sync", "time", "rt"] }
webpki-roots = "0.26.8"
futures-util = "0.3.31"
urlencoding = "2.1.3"
ws_stream_wasm = { version = "0.7.4", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2.100", optional = true }
js-sys = { version = "0.3.77", optional = true }
wee_alloc = { version = "0.4.5", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.23.25"
tokio-tungstenite = { version = "0.26.2", features = [
"rustls-tls-webpki-roots",
"url",
] }
[dev-dependencies]
ed25519-dalek = { version = "2.1.1", features = ["rand_core", "signature"] }
rand = "0.8.5"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = { version = "1.0.140" }
serde_test = "1.0.177"
polyproto = { path = "./", features = ["types", "reqwest", "serde"] }
env_logger = "0.11.7"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
ws-mock = "0.3.0"
httptest = "0.16.3"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.50"
# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7" }
[target.'cfg(target_arch = "wasm32")'.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
lto = true
codegen-units = 1
panic = "abort"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }