Cargo.toml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. [package]
  2. name = "libthreema"
  3. version.workspace = true
  4. edition.workspace = true
  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.workspace = true
  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 = "data-backup-create"
  28. path = "examples/bin/data_backup_create.rs"
  29. required-features = ["cli"]
  30. [[example]]
  31. name = "data-backup-restore"
  32. path = "examples/bin/data_backup_restore.rs"
  33. required-features = ["cli"]
  34. [[example]]
  35. name = "d2d-rendezvous"
  36. path = "examples/bin/d2d_rendezvous.rs"
  37. required-features = ["cli"]
  38. [[example]]
  39. name = "d2m-ping-pong"
  40. path = "examples/bin/d2m_ping_pong.rs"
  41. required-features = ["cli"]
  42. [[example]]
  43. name = "identity-create"
  44. path = "examples/bin/identity_create.rs"
  45. required-features = ["cli"]
  46. [[example]]
  47. name = "remote-secret"
  48. path = "examples/bin/remote_secret.rs"
  49. required-features = ["cli"]
  50. [[example]]
  51. name = "update-work-properties"
  52. path = "examples/bin/update_work_properties.rs"
  53. required-features = ["cli"]
  54. [dependencies]
  55. arrayref = "0.3"
  56. chrono = {
  57. version = "0.4",
  58. default-features = false,
  59. features = [
  60. "clock",
  61. "std",
  62. ]
  63. }
  64. const_format = { version = "0.2", features = ["rust_1_83"] }
  65. derive_builder = { version = "0.20", default-features = false, features = ["alloc", "std"] }
  66. duplicate = "2"
  67. educe = { version = "0.7.4", default-features = false, features = ["Debug"] }
  68. form_urlencoded = "1"
  69. itertools = "0.14"
  70. libthreema-dependencies = { path = "../dependencies" }
  71. libthreema-macros = { path = "../macros" }
  72. prost = "0.14"
  73. regex = "1"
  74. serde = { version = "1", features = ["alloc", "derive"] }
  75. serde_json = "1"
  76. serde_repr = "0.1"
  77. strum = { version = "0.28", features = ["derive"] }
  78. thiserror = "2"
  79. tracing = "0.1"
  80. zeroize = "1"
  81. # Bindings (UniFFi/WASM), CLI
  82. tracing-subscriber = { version = "0.3", optional = true }
  83. # Bindings: UniFFI
  84. uniffi = { version = "0.32", optional = true }
  85. # Bindings: WASM
  86. getrandom = {
  87. version = "0.2", # 0.3+ held back by rand_core@0.6 required by all crypto dependencies
  88. features = ["js"],
  89. optional = true,
  90. }
  91. js-sys = { version = "0.3", optional = true }
  92. serde_bytes = { version = "0.11", optional = true }
  93. tsify = { version = "0.5", features = ["js"], optional = true }
  94. # When bumping the wasm-bindgen version, increase the `image` version in
  95. # `.devcontainer/devcontainer.json` and `.gitlab-ci.yml`
  96. wasm-bindgen = { version = "=0.2.127", optional = true }
  97. web-time = { version = "1", optional = true }
  98. # CLI
  99. anyhow = { version = "1", optional = true }
  100. clap = { version = "4", features = ["cargo", "derive"], optional = true }
  101. futures-util = { version = "0.3", optional = true }
  102. reqwest = {
  103. version = "0.13",
  104. default-features = false,
  105. features = [
  106. "http2",
  107. "native-tls",
  108. ],
  109. optional = true
  110. }
  111. tokio = {
  112. version = "1",
  113. default-features = false,
  114. features = [
  115. "io-util",
  116. "macros",
  117. "net",
  118. "rt",
  119. "rt-multi-thread",
  120. "signal",
  121. "sync",
  122. "time",
  123. ],
  124. optional = true
  125. }
  126. tokio-tungstenite = {
  127. version = "0.30",
  128. default-features = false,
  129. features = [
  130. "connect",
  131. "native-tls",
  132. ],
  133. optional = true
  134. }
  135. [dev-dependencies]
  136. anyhow = "1"
  137. assert_matches = "1.5"
  138. derive_builder = "0.20"
  139. libthreema-dependencies = { path = "../dependencies" }
  140. rstest = "0.26"
  141. rstest_reuse = "0.7"
  142. tracing-subscriber = "0.3"
  143. [build-dependencies]
  144. prost-build = "0.14"
  145. # Bindings: UniFFI
  146. uniffi = { version = "0.32", features = ["build"], optional = true }
  147. [features]
  148. cli = [
  149. "dep:anyhow",
  150. "dep:clap",
  151. "dep:futures-util",
  152. "dep:reqwest",
  153. "dep:tokio",
  154. "dep:tokio-tungstenite",
  155. "dep:tracing-subscriber",
  156. "libthreema-dependencies/seedable-rng",
  157. ]
  158. slow_tests = []
  159. uniffi = ["dep:tracing-subscriber", "dep:uniffi"]
  160. wasm = [
  161. "chrono/wasmbind",
  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