Cargo.toml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. hmac = { version = "0.12", default-features = false }
  45. itertools = "0.14"
  46. libthreema-macros = { path = "../macros" }
  47. pbkdf2 = "0.12"
  48. poly1305 = { version = "0.8", default-features = false, features = ["zeroize"] }
  49. prost = "0.14"
  50. rand = "0.8"
  51. regex = "1"
  52. salsa20 = { version = "0.10", default-features = false, features = [
  53. "std",
  54. "zeroize",
  55. ] }
  56. scrypt = { version = "0.11", default-features = false }
  57. serde = { version = "1", features = ["alloc", "derive"] }
  58. serde_json = "1"
  59. serde_repr = "0.1"
  60. sha2 = { version = "0.10", default-features = false, features = [
  61. "std",
  62. # "zeroize",
  63. ] }
  64. strum = { version = "0.27", features = ["derive"] }
  65. subtle = { version = "2", features = ["const-generics"] }
  66. thiserror = "2"
  67. tracing = "0.1"
  68. x25519-dalek = { version = "2", features = [
  69. "reusable_secrets",
  70. "static_secrets",
  71. "zeroize",
  72. ] }
  73. zeroize = "1"
  74. # Bindings and CLI
  75. tracing-subscriber = { version = "0.3", optional = true }
  76. # Bindings: UniFFI
  77. uniffi = { version = "0.29", optional = true }
  78. # Bindings: WASM
  79. getrandom = { version = "0.2", features = ["js"], optional = true }
  80. js-sys = { version = "0.3", optional = true }
  81. serde_bytes = { version = "0.11", optional = true }
  82. tsify = { version = "0.5", features = ["js"], optional = true }
  83. wasm-bindgen = { version = "0.2", optional = true }
  84. web-time = { version = "1", optional = true }
  85. # CLI
  86. anyhow = { version = "1", optional = true }
  87. clap = { version = "4", features = ["cargo", "derive"], optional = true }
  88. reqwest = { version = "0.12", optional = true }
  89. [dev-dependencies]
  90. anyhow = "1"
  91. assert_matches = "1.5"
  92. derive_builder = "0.20"
  93. rstest = "0.26"
  94. rstest_reuse = "0.7"
  95. tokio = { version = "1", default-features = false, features = [
  96. "io-util",
  97. "macros",
  98. "net",
  99. "rt",
  100. "rt-multi-thread",
  101. "signal",
  102. "sync",
  103. "time",
  104. ] }
  105. tracing-subscriber = "0.3"
  106. [build-dependencies]
  107. prost-build = "0.14"
  108. # Bindings: UniFFI
  109. uniffi = { version = "0.29", features = ["build"], optional = true }
  110. [features]
  111. slow_tests = []
  112. uniffi = ["dep:tracing-subscriber", "dep:uniffi"]
  113. wasm = [
  114. "dep:getrandom",
  115. "dep:js-sys",
  116. "dep:serde_bytes",
  117. "dep:tracing-subscriber",
  118. "dep:tsify",
  119. "dep:wasm-bindgen",
  120. "dep:web-time",
  121. ]
  122. cli = ["dep:tracing-subscriber", "dep:anyhow", "dep:clap", "dep:reqwest"]
  123. [[example]]
  124. name = "csp-e2e-receive"
  125. path = "examples/bin/csp_e2e_receive.rs"
  126. required-features = ["cli"]
  127. [[example]]
  128. name = "csp-login"
  129. path = "examples/bin/csp_login.rs"
  130. required-features = ["cli"]
  131. [[example]]
  132. name = "csp-ping-pong"
  133. path = "examples/bin/csp_ping_pong.rs"
  134. required-features = ["cli"]
  135. [[example]]
  136. name = "d2d-rendezvous"
  137. path = "examples/bin/d2d_rendezvous.rs"
  138. required-features = ["cli"]
  139. [[example]]
  140. name = "identity-create"
  141. path = "examples/bin/identity_create.rs"
  142. required-features = ["cli"]
  143. [[example]]
  144. name = "remote-secret"
  145. path = "examples/bin/remote_secret.rs"
  146. required-features = ["cli"]