-
Notifications
You must be signed in to change notification settings - Fork 20
/
Cargo.toml
139 lines (126 loc) · 4.54 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
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
[workspace]
members = [
"examples/cli",
"mls_validation_service",
"xmtp_cryptography",
"xmtp_api_grpc",
"xmtp_api_http",
"xmtp_proto",
"xmtp_user_preferences",
"xmtp_v2",
"xmtp_mls",
"xmtp_id",
"bindings_wasm",
"bindings_node",
"bindings_ffi",
"xtask"
]
# Make the feature resolver explicit.
# See https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html#details
resolver = "2"
[workspace.package]
version = "0.1.0"
license = "MIT"
[workspace.dependencies]
anyhow = "1.0"
async-stream = "0.3"
async-trait = "0.1.77"
chrono = "0.4.38"
wasm-timer = "0.2"
ctor = "0.2"
ed25519 = "2.2.3"
ed25519-dalek = { version = "2.1.1", features = ["zeroize"] }
ethers = { version = "2.0", default-features = false }
futures = "0.3.30"
futures-core = "0.3.30"
getrandom = { version = "0.2", default-features = false }
hex = "0.4.3"
openmls = { git = "https://github.com/xmtp/openmls", rev = "043b347cb18d528647df36f500725ab57c41c7db", default-features = false }
openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "043b347cb18d528647df36f500725ab57c41c7db" }
openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "043b347cb18d528647df36f500725ab57c41c7db" }
openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "043b347cb18d528647df36f500725ab57c41c7db" }
pbjson = "0.7.0"
pbjson-types = "0.7.0"
prost = "^0.13"
prost-types = "^0.13"
rand = "0.8.5"
uuid = "1.10"
base64 = "0.22"
regex = "1.10.4"
rustc-hex = "2.1.0"
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false }
sha2 = "0.10.8"
sha3 = "0.10.8"
thiserror = "1.0"
tls_codec = "0.4.1"
tokio = { version = "1.35.1", default-features = false }
# Changing this version and rustls may potentially break the android build. Use Caution.
# Test with Android and Swift first.
# Its probably preferable to one day use https://github.com/rustls/rustls-native-certs
# Until then, always test agains iOS/Android after updating these dependencies & making a PR
tonic = { version = "0.12.3", features = ["tls", "tls-native-roots", "tls-webpki-roots"] }
rustls = { version = "=0.23.7", features = ["ring"] }
# Pinned Dependencies
tracing = { version = "0.1", features = ["log", "release_max_level_debug"] }
tracing-subscriber = { version = "0.3", default-features = false }
diesel = { version = "2.2", default-features = false }
diesel-wasm-sqlite = "0.0.1"
diesel_migrations = { version = "2.2", default-features = false }
parking_lot = "0.12.3"
wasm-bindgen-futures = "0.4"
wasm-bindgen = "=0.2.95"
wasm-bindgen-test = "0.3.45"
gloo-timers = "0.3"
web-sys = "0.3"
js-sys = "0.3"
openssl-sys = { version = "0.9", features = ["vendored"] }
openssl = { version = "0.10", features = ["vendored"] }
libsqlite3-sys = { version = "0.29", features = ["bundled-sqlcipher-vendored-openssl" ] }
dyn-clone = "1"
trait-variant = "0.1.2"
url = "2.5.0"
zeroize = "1.8"
bincode = "1.3"
console_error_panic_hook = "0.1"
# Internal Crate Dependencies
xmtp_cryptography = { path = "xmtp_cryptography" }
xmtp_id = { path = "xmtp_id" }
xmtp_mls = { path = "xmtp_mls" }
xmtp_proto = { path = "xmtp_proto" }
[profile.dev]
# Disabling debug info speeds up builds a bunch,
# and we don't rely on it for debugging that much.
debug = 0
# Setting opt-level to 3 for proc macros/build scripts
# speeds up buildtime
[profile.dev.build-override]
opt-level = 3
[profile.release]
incremental = true
opt-level = "s"
panic = 'abort'
[profile.release-with-lto]
inherits = "release"
lto = true
[profile.release.package.bindings_node]
strip = "symbols"
# NOTE: The release profile reduces bundle size from 230M to 41M - may have performance impliciations
# https://stackoverflow.com/a/54842093
[profile.release.package.xmtpv3]
inherits = "release-with-lto"
codegen-units = 1 # Reduce number of codegen units to increase optimizations
opt-level = 'z' # Optimize for size + loop vectorization
strip = true # Strip symbols from binary*
[profile.release.package.bindings_wasm]
inherits = "release-with-lto"
# optimize for binary size
opt-level = "s"
# patch needed until some items
# are made public for third-party dependencies: https://github.com/diesel-rs/diesel/pull/4236
# (cfg-specific patche support does not exist)
[patch.crates-io]
diesel-wasm-sqlite = { git = "https://github.com/xmtp/diesel-wasm-sqlite", branch = "main" }
diesel = { git = "https://github.com/diesel-rs/diesel", branch = "master" }
diesel_derives = { git = "https://github.com/diesel-rs/diesel", branch = "master" }
diesel_migrations = { git = "https://github.com/diesel-rs/diesel", branch = "master" }