Cargo.toml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. [package]
  2. name = "libthreema"
  3. version = "0.1.0"
  4. description = "One library to bind them all"
  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. argon2 = { version = "0.5", default-features = false, features = ["alloc"] }
  19. aead = { version = "0.5", default-features = false, features = [
  20. "alloc",
  21. "rand_core",
  22. "std",
  23. ] }
  24. blake2 = { version = "0.10", default-features = false, features = [
  25. "std",
  26. # "zeroize",
  27. ] }
  28. chacha20poly1305 = { version = "0.10", default-features = false, features = [
  29. "alloc",
  30. ] }
  31. cipher = "0.4"
  32. const_format = { version = "0.2", features = ["rust_1_64"] }
  33. crypto_secretbox = { version = "0.1", default-features = false, features = [
  34. "alloc",
  35. "salsa20",
  36. ] }
  37. data-encoding = "2.6"
  38. digest = "0.10"
  39. duplicate = "2"
  40. educe = { version = "0.6", default-features = false, features = ["Debug"] }
  41. hmac = { version = "0.12", default-features = false }
  42. libthreema-macros = { path = "../macros" }
  43. pbkdf2 = "0.12"
  44. prost = "0.13"
  45. rand = "0.8"
  46. regex = "1"
  47. salsa20 = { version = "0.10", default-features = false, features = [
  48. "std",
  49. "zeroize",
  50. ] }
  51. scrypt = { version = "0.11", default-features = false }
  52. serde = { version = "1", features = ["alloc", "derive"] }
  53. serde_repr = "0.1"
  54. serde_json = "1"
  55. sha2 = { version = "0.10", default-features = false, features = [
  56. "std",
  57. # "zeroize",
  58. ] }
  59. strum = { version = "0.27", features = ["derive"] }
  60. thiserror = "2"
  61. tracing = "0.1"
  62. x25519-dalek = { version = "2", features = [
  63. "reusable_secrets",
  64. "static_secrets",
  65. "zeroize",
  66. ] }
  67. zeroize = "1"
  68. # Bindings and CLI
  69. tracing-subscriber = { version = "0.3", optional = true }
  70. # Bindings: UniFFI
  71. uniffi = { version = "0.29", optional = true }
  72. # Bindings: WASM
  73. getrandom = { version = "0.2", features = ["js"], optional = true }
  74. js-sys = { version = "0.3", optional = true }
  75. serde_bytes = { version = "0.11", optional = true }
  76. tsify-next = { version = "0.5", features = ["js"], optional = true }
  77. wasm-bindgen = { version = "0.2", optional = true }
  78. web-time = { version = "1", optional = true }
  79. # CLI
  80. clap = { version = "4", features = ["derive"], optional = true }
  81. [dev-dependencies]
  82. anyhow = "1"
  83. tokio = { version = "1", default-features = false, features = [
  84. "io-util",
  85. "macros",
  86. "net",
  87. "rt",
  88. "rt-multi-thread",
  89. "signal",
  90. "sync",
  91. "time",
  92. ] }
  93. [build-dependencies]
  94. prost-build = "0.13"
  95. # Bindings: UniFFI
  96. uniffi = { version = "0.29", features = ["build"], optional = true }
  97. [features]
  98. uniffi = ["dep:tracing-subscriber", "dep:uniffi"]
  99. wasm = [
  100. "dep:getrandom",
  101. "dep:js-sys",
  102. "dep:serde_bytes",
  103. "dep:tracing-subscriber",
  104. "dep:tsify-next",
  105. "dep:wasm-bindgen",
  106. "dep:web-time",
  107. ]
  108. cli = ["dep:tracing-subscriber", "dep:clap"]
  109. [[example]]
  110. name = "csp"
  111. required-features = ["cli"]
  112. [[example]]
  113. name = "d2d_rendezvous"
  114. required-features = ["cli"]