Cargo.toml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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/minerd",
  22. "bin/darkfi-mmproxy",
  23. "bin/drk",
  24. #"bin/fud/fu",
  25. #"bin/fud/fud",
  26. "bin/genev/genevd",
  27. "bin/genev/genev-cli",
  28. "bin/darkirc",
  29. "bin/tau/taud",
  30. #"bin/tau/tau-cli",
  31. "bin/vanityaddr",
  32. "bin/lilith",
  33. "src/sdk",
  34. "src/sdk/python",
  35. "src/serial",
  36. "src/serial/derive",
  37. "src/serial/derive-internal",
  38. "src/contract/test-harness",
  39. "src/contract/money",
  40. "src/contract/dao",
  41. "src/contract/deployooor",
  42. "example/dchat/dchatd",
  43. ]
  44. [dependencies]
  45. # Hard dependencies
  46. libc = "0.2.153"
  47. log = "0.4.21"
  48. thiserror = "1.0.57"
  49. # async-runtime
  50. async-recursion = {version = "1.0.5", optional = true}
  51. async-trait = {version = "0.1.77", optional = true}
  52. futures = {version = "0.3.30", optional = true}
  53. smol = {version = "1.3.0", optional = true}
  54. pin-project-lite = {version = "0.2.13", optional = true}
  55. # Networking
  56. futures-rustls = {version = "0.25.1", optional = true}
  57. # Pluggable Transports
  58. socket2 = {version = "0.5.6", features = ["all"], optional = true}
  59. arti-client = {version = "0.14.1", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "accel-sha1-asm", "accel-openssl", "onion-service-client", "onion-service-service"], optional = true}
  60. tor-error = {version = "0.6.1", optional = true}
  61. tor-rtcompat = {version = "0.10.0", features = ["async-std", "rustls"], optional = true}
  62. tor-hscrypto = {version = "0.6.1", optional = true}
  63. # TLS cert utilities
  64. ed25519-compact = {version = "2.1.1", optional = true}
  65. rcgen = {version = "0.12.1", optional = true}
  66. rustls-pemfile = {version = "2.1.1", optional = true}
  67. x509-parser = {version = "0.16.0", features = ["validate", "verify"], optional = true}
  68. # Encoding
  69. bs58 = {version = "0.5.0", optional = true}
  70. serde = {version = "1.0.197", features = ["derive"], optional = true}
  71. tinyjson = {version = "2.5.1", optional = true}
  72. semver = {version = "1.0.22", optional = true}
  73. structopt = {version= "0.3.26", optional = true}
  74. structopt-toml = {version= "0.5.1", optional = true}
  75. toml = {version = "0.8.10", optional = true}
  76. # Utilities
  77. # TODO: check chrono usage and impl our own
  78. chrono = {version = "0.4.35", optional = true}
  79. darkfi-serial = {path = "src/serial", optional = true}
  80. darkfi-derive = {path = "src/serial/derive", optional = true}
  81. lazy_static = {version = "1.4.0", optional = true}
  82. num-bigint = {version = "0.4.4", optional = true}
  83. url = {version = "2.5.0", features = ["serde"], optional = true}
  84. # Misc
  85. simplelog = {version = "0.12.2", optional = true}
  86. # Crypto
  87. rand = {version = "0.8.5", optional = true}
  88. blake3 = {version = "1.5.0", features = ["rayon"], optional = true}
  89. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  90. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  91. halo2_gadgets = {version = "0.3.0", features = ["circuit-params"], optional = true}
  92. # Smart contract runtime
  93. darkfi-sdk = {path = "src/sdk", optional = true}
  94. wasmer = {version = "4.2.6", optional = true}
  95. wasmer-compiler-singlepass = {version = "4.2.6", optional = true}
  96. wasmer-middlewares = {version = "4.2.6", optional = true}
  97. # SQLite stuff
  98. rusqlite = {version = "0.31.0", features = ["sqlcipher"], optional = true}
  99. libsqlite3-sys = {version = "0.28.0", features = ["sqlcipher"], optional = true}
  100. # Blockchain store
  101. sled = {version = "0.34.7", optional = true}
  102. sled-overlay = {version = "0.1.1", optional = true}
  103. # Miner
  104. randomx = {git = "https://github.com/darkrenaissance/RandomX", optional = true}
  105. [dev-dependencies]
  106. clap = {version = "4.5.2", features = ["derive"]}
  107. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  108. halo2_gadgets = "0.3.0"
  109. plotters = "0.3.5"
  110. easy-parallel = "3.3.1"
  111. prettytable-rs = "0.10.0"
  112. # Used for benchmarks
  113. criterion = { version = "0.4", features = ["html_reports"] }
  114. # -----BEGIN LIBRARY FEATURES-----
  115. [features]
  116. async-daemonize = ["system"]
  117. async-serial = ["darkfi-serial/async"]
  118. async-sdk = [
  119. "darkfi-sdk/async",
  120. "async-serial",
  121. ]
  122. blockchain = [
  123. "blake3",
  124. "sled",
  125. "sled-overlay",
  126. "num-bigint",
  127. "async-sdk",
  128. "async-serial",
  129. "tx",
  130. "util",
  131. "zk",
  132. "zkas",
  133. ]
  134. validator = [
  135. "async-trait",
  136. "blake3",
  137. "crypto_api_chachapoly",
  138. "halo2_proofs",
  139. "lazy_static",
  140. "num-bigint",
  141. "rand",
  142. "randomx",
  143. "smol",
  144. "sled",
  145. "url",
  146. "async-sdk",
  147. "async-serial",
  148. "blockchain",
  149. "net",
  150. "rpc",
  151. "system",
  152. "tx",
  153. "util",
  154. "wasm-runtime",
  155. "zk",
  156. "zkas",
  157. ]
  158. geode = [
  159. "blake3",
  160. "futures",
  161. "smol",
  162. ]
  163. event-graph = [
  164. "async-trait",
  165. "async-recursion",
  166. "blake3",
  167. "num-bigint",
  168. "rand",
  169. "sled",
  170. "sled-overlay",
  171. "smol",
  172. "tinyjson",
  173. "darkfi-serial",
  174. "darkfi-serial/collections",
  175. "darkfi-serial/hash",
  176. "net",
  177. "rpc",
  178. "system",
  179. "util",
  180. ]
  181. p2p-unix = []
  182. p2p-tcp = ["socket2"]
  183. p2p-tor = ["arti-client", "tor-hscrypto", "tor-error", "tor-rtcompat", "libsqlite3-sys"]
  184. p2p-nym = []
  185. net = [
  186. "async-trait",
  187. "ed25519-compact",
  188. "futures",
  189. "futures-rustls",
  190. "rand",
  191. "rcgen",
  192. "rustls-pemfile",
  193. "semver",
  194. "smol",
  195. "serde",
  196. "structopt",
  197. "structopt-toml",
  198. "url",
  199. "x509-parser",
  200. "darkfi-serial",
  201. "darkfi-serial/url",
  202. "async-serial",
  203. "system",
  204. "util",
  205. "p2p-tcp",
  206. "p2p-tor",
  207. #"p2p-nym",
  208. "p2p-unix",
  209. ]
  210. rpc = [
  211. "async-trait",
  212. "rand",
  213. "smol",
  214. "tinyjson",
  215. "url",
  216. "net",
  217. "system",
  218. "util",
  219. ]
  220. system = [
  221. "pin-project-lite",
  222. "rand",
  223. "smol",
  224. ]
  225. tx = [
  226. "blake3",
  227. "rand",
  228. "async-sdk",
  229. "async-serial",
  230. "zk",
  231. ]
  232. util = [
  233. "simplelog",
  234. "tinyjson",
  235. "darkfi-serial",
  236. ]
  237. wasm-runtime = [
  238. "wasmer",
  239. "wasmer-compiler-singlepass",
  240. "wasmer-middlewares",
  241. "darkfi-sdk",
  242. "darkfi-serial",
  243. "blockchain",
  244. "util",
  245. "zk",
  246. "zkas",
  247. ]
  248. zk = [
  249. "halo2_proofs",
  250. "halo2_gadgets",
  251. "rand",
  252. "async-serial",
  253. "async-sdk",
  254. "zkas",
  255. ]
  256. zkas = [
  257. "darkfi-serial",
  258. ]
  259. # -----END LIBRARY FEATURES-----
  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. # Temp rust nightly fix
  264. pathfinder_simd = {git="https://github.com/servo/pathfinder", branch="main"}
  265. [[bench]]
  266. name = "zk_arith"
  267. harness = false
  268. path = "bench/zk_arith.rs"
  269. [[bench]]
  270. name = "zk_from_json"
  271. harness = false
  272. path = "bench/zk_from_json.rs"