Cargo.toml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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.44"
  55. # async-runtime
  56. async-std = {version = "1.12.0", features = ["attributes"], optional = true}
  57. async-trait = {version = "0.1.72", 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.103", optional = true}
  74. serde = {version = "1.0.174", features = ["derive"], optional = true}
  75. semver = {version = "1.0.18", 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. itertools = {version = "0.11.0", optional = true}
  87. lazy_static = {version = "1.4.0", optional = true}
  88. # TODO: Test without serde
  89. url = {version = "2.4.0", features = ["serde"], optional = true}
  90. # Misc
  91. # TODO: Implement something simple and kill these deps
  92. simplelog = {version = "0.12.1", optional = true}
  93. # Crypto
  94. rand = {version = "0.8.5", optional = true}
  95. blake3 = {version = "1.4.1", features = ["rayon"], optional = true}
  96. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  97. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  98. halo2_gadgets = {version = "0.3.0", features = ["circuit-params"], optional = true}
  99. # Smart contract runtime
  100. darkfi-sdk = {path = "src/sdk", optional = true}
  101. wasmer = {version = "4.0.0", optional = true}
  102. wasmer-compiler-singlepass = {version = "4.0.0", optional = true}
  103. wasmer-middlewares = {version = "4.0.0", optional = true}
  104. # Wallet management
  105. rusqlite = {version = "0.29.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  106. libsqlite3-sys = {version = "0.26.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  107. # Blockchain store
  108. sled = {version = "0.34.7", optional = true}
  109. sled-overlay = {version = "0.0.8", optional = true}
  110. [dev-dependencies]
  111. clap = {version = "4.3.19", features = ["derive"]}
  112. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  113. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  114. plotters = "0.3.5"
  115. easy-parallel = "3.3.0"
  116. prettytable-rs = "0.10.0"
  117. # -----BEGIN LIBRARY FEATURES-----
  118. [features]
  119. p2p-transport-tcp = []
  120. p2p-transport-tor = ["arti-client", "tor-hscrypto"]
  121. p2p-transport-nym = []
  122. async-runtime = [
  123. "async-std",
  124. "async-trait",
  125. "futures",
  126. "smol",
  127. ]
  128. blockchain = [
  129. "blake3",
  130. "bs58", # <-- TODO: remove after we get rid of json for notifications
  131. "crypto_api_chachapoly",
  132. "dashu",
  133. "halo2_proofs",
  134. "lazy_static",
  135. "rand",
  136. "sled",
  137. "sled-overlay",
  138. "url",
  139. "async-runtime",
  140. "darkfi-sdk",
  141. "darkfi-serial/crypto",
  142. "net",
  143. "rpc",
  144. "tx",
  145. "util",
  146. "wallet",
  147. "wasm-runtime",
  148. ]
  149. dht = [
  150. "blake3",
  151. "chrono",
  152. "rand",
  153. "async-runtime",
  154. "darkfi-serial",
  155. "darkfi-serial/collections",
  156. "darkfi-serial/hash",
  157. "net",
  158. ]
  159. geode = [
  160. "blake3",
  161. ]
  162. event-graph = [
  163. "blake3",
  164. "rand",
  165. "async-runtime",
  166. "darkfi-serial",
  167. "darkfi-serial/collections",
  168. "darkfi-serial/hash",
  169. "net",
  170. ]
  171. net = [
  172. "ed25519-compact",
  173. "async-rustls",
  174. "structopt",
  175. "structopt-toml",
  176. "rand",
  177. "rcgen",
  178. "rustls-pemfile",
  179. "x509-parser",
  180. "semver",
  181. "serde",
  182. "serde_json",
  183. "socket2",
  184. "url",
  185. "async-runtime",
  186. "darkfi-serial",
  187. "darkfi-serial/async",
  188. "darkfi-serial/url",
  189. "system",
  190. "util",
  191. "p2p-transport-tcp",
  192. "p2p-transport-tor",
  193. "p2p-transport-nym",
  194. ]
  195. rpc = [
  196. "rand",
  197. "serde",
  198. "serde_json",
  199. "url",
  200. "async-runtime",
  201. "darkfi-serial",
  202. "net",
  203. ]
  204. system = [
  205. "rand",
  206. "async-runtime",
  207. ]
  208. tx = [
  209. "blake3",
  210. "async-runtime",
  211. "darkfi-sdk",
  212. "darkfi-serial",
  213. "zk",
  214. ]
  215. util = [
  216. "rand",
  217. "simplelog",
  218. "serde",
  219. "serde_json",
  220. "toml",
  221. "darkfi-serial",
  222. ]
  223. wallet = [
  224. "async-std",
  225. "rusqlite",
  226. "darkfi-serial",
  227. "util",
  228. ]
  229. wasm-runtime = [
  230. "wasmer",
  231. "wasmer-compiler-singlepass",
  232. "wasmer-middlewares",
  233. "blockchain",
  234. "darkfi-sdk",
  235. ]
  236. zk = [
  237. "halo2_proofs",
  238. "halo2_gadgets",
  239. "rand",
  240. "darkfi-sdk",
  241. "zkas",
  242. ]
  243. zkas = [
  244. "itertools",
  245. "darkfi-serial",
  246. ]
  247. # -----END LIBRARY FEATURES-----
  248. [[example]]
  249. name = "net"
  250. path = "example/net.rs"
  251. required-features = ["async-runtime", "net"]
  252. [[example]]
  253. name = "zk"
  254. path = "example/zk.rs"
  255. required-features = ["zk"]
  256. [[example]]
  257. name = "zk-inclusion-proof"
  258. path = "example/zk-inclusion-proof.rs"
  259. required-features = ["zk"]
  260. [patch.crates-io]
  261. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  262. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  263. arti-client = {git="https://gitlab.torproject.org/tpo/core/arti", rev="77b0dc2edc93c9ad09b833b176e0f7066f017dd1"}
  264. tor-hscrypto = {git="https://gitlab.torproject.org/tpo/core/arti", rev="77b0dc2edc93c9ad09b833b176e0f7066f017dd1"}