Cargo.toml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. [package]
  2. name = "libthreema"
  3. version = "0.1.0"
  4. description = "A suite of protocol implementations, utilities and FFI bindings tailored for Threema clients"
  5. authors = ["Threema GmbH"]
  6. license = "AGPL-3.0-only"
  7. readme = "../README.md"
  8. edition = "2024"
  9. repository = "<Insert URL when publishing>"
  10. keywords = ["threema", "protocol", "messenger", "communication"]
  11. categories = ["api-bindings", "cryptography"]
  12. [lib]
  13. name = "libthreema"
  14. crate-type = ["lib", "staticlib", "cdylib"]
  15. [lints]
  16. workspace = true
  17. [dependencies]
  18. aead = { version = "0.5", default-features = false, features = [
  19. "alloc",
  20. "rand_core",
  21. "std",
  22. ] }
  23. argon2 = { version = "0.5", default-features = false, features = ["alloc"] }
  24. blake2 = { version = "0.10", default-features = false, features = [
  25. "std",
  26. # "zeroize",
  27. ] }
  28. chacha20 = { version = "0.9", features = ["zeroize"] }
  29. chacha20poly1305 = { version = "0.10", default-features = false, features = [
  30. "alloc",
  31. ] }
  32. cipher = "0.4"
  33. const_format = { version = "0.2", features = ["rust_1_64"] }
  34. crypto_secretbox = { version = "0.1", default-features = false, features = [
  35. "alloc",
  36. "salsa20",
  37. ] }
  38. data-encoding = "2"
  39. digest = "0.10"
  40. duplicate = "2"
  41. ed25519-dalek = "2"
  42. educe = { version = "0.6", default-features = false, features = ["Debug"] }
  43. form_urlencoded = "1"
  44. generic-array = "=0.14.7"
  45. hmac = { version = "0.12", default-features = false }
  46. itertools = "0.14"
  47. libthreema-macros = { path = "../macros" }
  48. pbkdf2 = "0.12"
  49. poly1305 = { version = "0.8", default-features = false, features = ["zeroize"] }
  50. prost = "0.14"
  51. rand = "0.8"
  52. regex = "1"
  53. salsa20 = { version = "0.10", default-features = false, features = [
  54. "std",
  55. "zeroize",
  56. ] }
  57. scrypt = { version = "0.11", default-features = false }
  58. serde = { version = "1", features = ["alloc", "derive"] }
  59. serde_json = "1"
  60. serde_repr = "0.1"
  61. sha2 = { version = "0.10", default-features = false, features = [
  62. "std",
  63. # "zeroize",
  64. ] }
  65. strum = { version = "0.27", features = ["derive"] }
  66. subtle = { version = "2", features = ["const-generics"] }
  67. thiserror = "2"
  68. tracing = "0.1"
  69. x25519-dalek = { version = "2", features = [
  70. "reusable_secrets",
  71. "static_secrets",
  72. "zeroize",
  73. ] }
  74. zeroize = "1"
  75. # Bindings (UniFFi/WASM), CLI
  76. tracing-subscriber = { version = "0.3", optional = true }
  77. # Bindings: UniFFI
  78. uniffi = { version = "0.30", optional = true }
  79. # Bindings: WASM
  80. getrandom = { version = "0.2", features = ["js"], optional = true }
  81. js-sys = { version = "0.3", optional = true }
  82. serde_bytes = { version = "0.11", optional = true }
  83. tsify = { version = "0.5", features = ["js"], optional = true }
  84. # When bumping the wasm-bindgen version, increase the `image` version in
  85. # `.devcontainer/devcontainer.json` and `.gitlab-ci.yml`
  86. wasm-bindgen = { version = "=0.2.105", optional = true }
  87. web-time = { version = "1", optional = true }
  88. # CLI
  89. anyhow = { version = "1", optional = true }
  90. clap = { version = "4", features = ["cargo", "derive"], optional = true }
  91. futures-util = { version = "0.3", optional = true }
  92. reqwest = { version = "0.12", default-features = false, features = [
  93. "http2",
  94. "rustls-tls",
  95. ], optional = true }
  96. rustls = { version = "0.23", default-features = false, features = [
  97. "ring",
  98. "std",
  99. ], optional = true }
  100. tokio = { version = "1", default-features = false, features = [
  101. "io-util",
  102. "macros",
  103. "net",
  104. "rt",
  105. "rt-multi-thread",
  106. "signal",
  107. "sync",
  108. "time",
  109. ], optional = true }
  110. tokio-tungstenite = { version = "0.26", default-features = false, features = [
  111. "connect",
  112. "rustls-tls-webpki-roots",
  113. ], optional = true }
  114. [dev-dependencies]
  115. anyhow = "1"
  116. assert_matches = "1.5"
  117. derive_builder = "0.20"
  118. rstest = "0.26"
  119. rstest_reuse = "0.7"
  120. tracing-subscriber = "0.3"
  121. [build-dependencies]
  122. prost-build = "0.14"
  123. # Bindings: UniFFI
  124. uniffi = { version = "0.30", features = ["build"], optional = true }
  125. [features]
  126. slow_tests = []
  127. uniffi = ["dep:uniffi", "dep:tracing-subscriber"]
  128. wasm = [
  129. "dep:getrandom",
  130. "dep:js-sys",
  131. "dep:serde_bytes",
  132. "dep:tracing-subscriber",
  133. "dep:tsify",
  134. "dep:wasm-bindgen",
  135. "dep:web-time",
  136. ]
  137. cli = [
  138. "dep:anyhow",
  139. "dep:clap",
  140. "dep:futures-util",
  141. "dep:reqwest",
  142. "dep:rustls",
  143. "dep:tokio",
  144. "dep:tokio-tungstenite",
  145. "dep:tracing-subscriber",
  146. ]
  147. [[example]]
  148. name = "csp-e2e-receive"
  149. path = "examples/bin/csp_e2e_receive.rs"
  150. required-features = ["cli"]
  151. [[example]]
  152. name = "csp-login"
  153. path = "examples/bin/csp_login.rs"
  154. required-features = ["cli"]
  155. [[example]]
  156. name = "csp-ping-pong"
  157. path = "examples/bin/csp_ping_pong.rs"
  158. required-features = ["cli"]
  159. [[example]]
  160. name = "d2d-rendezvous"
  161. path = "examples/bin/d2d_rendezvous.rs"
  162. required-features = ["cli"]
  163. [[example]]
  164. name = "identity-create"
  165. path = "examples/bin/identity_create.rs"
  166. required-features = ["cli"]
  167. [[example]]
  168. name = "remote-secret"
  169. path = "examples/bin/remote_secret.rs"
  170. required-features = ["cli"]
  171. [[example]]
  172. name = "d2m-ping-pong"
  173. path = "examples/bin/d2m_ping_pong.rs"
  174. required-features = ["cli"]