Cargo.toml 4.8 KB

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