Cargo.toml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. [package]
  2. name = "darkfi"
  3. version = "0.4.1"
  4. homepage = "https://dark.fi"
  5. description = "Anonymous. Uncensored. Sovereign."
  6. authors = ["Dyne.org foundation <foundation@dyne.org>"]
  7. repository = "https://github.com/darkrenaissance/darkfi"
  8. license = "AGPL-3.0-only"
  9. edition = "2021"
  10. [lib]
  11. name = "darkfi"
  12. doctest = false
  13. #[profile.release]
  14. #debug = true
  15. #lto = "fat"
  16. #codegen-units = 1
  17. [workspace]
  18. members = [
  19. "bin/zkas",
  20. "bin/darkfid",
  21. "bin/darkfid2",
  22. "bin/drk",
  23. "bin/faucetd",
  24. "bin/fud/fu",
  25. "bin/fud/fud",
  26. "bin/genev/genevd",
  27. "bin/genev/genev-cli",
  28. "bin/darkirc",
  29. #"bin/dnetview",
  30. "bin/tau/taud",
  31. "bin/tau/tau-cli",
  32. #"bin/darkwiki/darkwikid",
  33. #"bin/darkwiki/darkwiki-cli",
  34. "bin/dhtd/dhtd",
  35. "bin/vanityaddr",
  36. "bin/lilith",
  37. "bin/zktool",
  38. "src/sdk",
  39. "src/sdk/python",
  40. "src/serial",
  41. "src/serial/derive",
  42. "src/serial/derive-internal",
  43. "src/contract/test-harness",
  44. "src/contract/money",
  45. "src/contract/dao",
  46. "src/contract/consensus",
  47. "src/contract/deployooor",
  48. "example/dchat",
  49. ]
  50. [dependencies]
  51. # Hard dependencies
  52. libc = "0.2.147"
  53. log = "0.4.19"
  54. thiserror = "1.0.43"
  55. # async-runtime
  56. async-std = {version = "1.12.0", features = ["attributes"], optional = true}
  57. async-trait = {version = "0.1.71", optional = true}
  58. futures = {version = "0.3.28", optional = true}
  59. smol = {version = "1.3.0", optional = true}
  60. # Networking
  61. async-rustls = {version = "0.4.0", features = ["dangerous_configuration"], optional = true}
  62. socket2 = {version = "0.5.3", optional = true, features = ["all"]}
  63. # Pluggable Transports
  64. arti-client = {version = "0.9.2", default-features = false, features = ["async-std", "rustls", "onion-service-client"], optional = true}
  65. tor-hscrypto = {version = "0.3.0", optional = true}
  66. # TLS cert utilities
  67. ed25519-compact = {version = "2.0.4", optional = true}
  68. rcgen = {version = "0.11.1", optional = true}
  69. rustls-pemfile = {version = "1.0.3", optional = true}
  70. x509-parser = {version = "0.15.0", features = ["validate", "verify"], optional = true}
  71. # Encoding
  72. bs58 = {version = "0.5.0", optional = true}
  73. serde_json = {version = "1.0.102", optional = true}
  74. serde = {version = "1.0.171", features = ["derive"], optional = true}
  75. semver = {version = "1.0.17", optional = true}
  76. structopt = {version= "0.3.26", optional = true}
  77. structopt-toml = {version= "0.5.1", optional = true}
  78. toml = {version = "0.7.6", optional = true}
  79. # Big float high precision arithmetics
  80. dashu = {version = "0.3.1", optional = true}
  81. # Utilities
  82. # TODO: check chrono usage and impl our own
  83. chrono = {version = "0.4.26", optional = true}
  84. darkfi-serial = {path = "src/serial", optional = true}
  85. darkfi-derive = {path = "src/serial/derive", optional = true}
  86. darkfi-derive-internal = {path = "src/serial/derive-internal", optional = true}
  87. itertools = {version = "0.11.0", optional = true}
  88. lazy_static = {version = "1.4.0", optional = true}
  89. # TODO: Test without serde
  90. url = {version = "2.4.0", features = ["serde"], optional = true}
  91. # Misc
  92. # TODO: Implement something simple and kill these deps
  93. simplelog = {version = "0.12.1", optional = true}
  94. # Crypto
  95. rand = {version = "0.8.5", optional = true}
  96. blake3 = {version = "1.4.1", features = ["rayon"], optional = true}
  97. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  98. halo2_proofs = {version = "0.3.0", optional = true}
  99. halo2_gadgets = {version = "0.3.0", optional = true}
  100. # Smart contract runtime
  101. darkfi-sdk = {path = "src/sdk", optional = true}
  102. wasmer = {version = "4.0.0", optional = true}
  103. wasmer-compiler-singlepass = {version = "4.0.0", optional = true}
  104. wasmer-middlewares = {version = "4.0.0", optional = true}
  105. # Wallet management
  106. rusqlite = {version = "0.29.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  107. libsqlite3-sys = {version = "0.26.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  108. # Blockchain store
  109. sled = {version = "0.34.7", optional = true}
  110. sled-overlay = {version = "0.0.7", optional = true}
  111. [dev-dependencies]
  112. clap = {version = "4.3.11", features = ["derive"]}
  113. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  114. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  115. plotters = "0.3.5"
  116. easy-parallel = "3.3.0"
  117. prettytable-rs = "0.10.0"
  118. # -----BEGIN LIBRARY FEATURES-----
  119. [features]
  120. p2p-transport-tcp = []
  121. p2p-transport-tor = ["arti-client", "tor-hscrypto"]
  122. p2p-transport-nym = []
  123. async-runtime = [
  124. "async-std",
  125. "async-trait",
  126. "futures",
  127. "smol",
  128. ]
  129. blockchain = [
  130. "blake3",
  131. "bs58", # <-- TODO: remove after we get rid of json for notifications
  132. "crypto_api_chachapoly",
  133. "dashu",
  134. "halo2_proofs",
  135. "lazy_static",
  136. "rand",
  137. "sled",
  138. "sled-overlay",
  139. "url",
  140. "async-runtime",
  141. "darkfi-sdk",
  142. "darkfi-serial/crypto",
  143. "net",
  144. "rpc",
  145. "tx",
  146. "util",
  147. "wallet",
  148. "wasm-runtime",
  149. ]
  150. dht = [
  151. "blake3",
  152. "chrono",
  153. "rand",
  154. "async-runtime",
  155. "darkfi-serial",
  156. "darkfi-serial/collections",
  157. "darkfi-serial/hash",
  158. "net",
  159. ]
  160. event-graph = [
  161. "blake3",
  162. "rand",
  163. "async-runtime",
  164. "darkfi-serial/hash",
  165. "net",
  166. ]
  167. net = [
  168. "ed25519-compact",
  169. "async-rustls",
  170. "structopt",
  171. "structopt-toml",
  172. "rand",
  173. "rcgen",
  174. "rustls-pemfile",
  175. "x509-parser",
  176. "semver",
  177. "serde",
  178. "serde_json",
  179. "socket2",
  180. "url",
  181. "async-runtime",
  182. "darkfi-serial",
  183. "darkfi-serial/async",
  184. "darkfi-serial/url",
  185. "system",
  186. "util",
  187. "p2p-transport-tcp",
  188. "p2p-transport-tor",
  189. "p2p-transport-nym",
  190. ]
  191. rpc = [
  192. "rand",
  193. "serde",
  194. "serde_json",
  195. "url",
  196. "async-runtime",
  197. "darkfi-serial",
  198. "net",
  199. ]
  200. system = [
  201. "rand",
  202. "async-runtime",
  203. ]
  204. tx = [
  205. "blake3",
  206. "async-runtime",
  207. "darkfi-sdk",
  208. "darkfi-serial",
  209. "zk",
  210. ]
  211. util = [
  212. "simplelog",
  213. "serde",
  214. "serde_json",
  215. "toml",
  216. "darkfi-serial",
  217. ]
  218. wallet = [
  219. "async-std",
  220. "rusqlite",
  221. "darkfi-serial",
  222. "util",
  223. ]
  224. wasm-runtime = [
  225. "wasmer",
  226. "wasmer-compiler-singlepass",
  227. "wasmer-middlewares",
  228. "blockchain",
  229. "darkfi-sdk",
  230. ]
  231. zk = [
  232. "halo2_proofs",
  233. "halo2_gadgets",
  234. "rand",
  235. "darkfi-sdk",
  236. "zkas",
  237. ]
  238. zkas = [
  239. "itertools",
  240. "darkfi-serial",
  241. ]
  242. # -----END LIBRARY FEATURES-----
  243. [[example]]
  244. name = "net"
  245. path = "example/net.rs"
  246. required-features = ["async-runtime", "net"]
  247. [[example]]
  248. name = "zk"
  249. path = "example/zk.rs"
  250. required-features = ["zk"]
  251. [[example]]
  252. name = "zk-inclusion-proof"
  253. path = "example/zk-inclusion-proof.rs"
  254. required-features = ["zk"]
  255. [patch.crates-io]
  256. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"}
  257. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"}
  258. arti-client = {git="https://gitlab.torproject.org/tpo/core/arti", rev="77b0dc2edc93c9ad09b833b176e0f7066f017dd1"}
  259. tor-hscrypto = {git="https://gitlab.torproject.org/tpo/core/arti", rev="77b0dc2edc93c9ad09b833b176e0f7066f017dd1"}