Cargo.toml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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/cashierd",
  21. "bin/darkfid",
  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/ircd",
  29. "bin/darkirc",
  30. "bin/dnetview",
  31. #"bin/dao/daod",
  32. #"bin/dao/dao-cli",
  33. "bin/tau/taud",
  34. "bin/tau/tau-cli",
  35. #"bin/darkwiki/darkwikid",
  36. #"bin/darkwiki/darkwiki-cli",
  37. "bin/dhtd/dhtd",
  38. "bin/vanityaddr",
  39. "bin/lilith",
  40. "bin/zktool",
  41. "src/sdk",
  42. "src/darkfi-sdk-py",
  43. "src/serial",
  44. "src/serial/derive",
  45. "src/serial/derive-internal",
  46. "src/contract/test-harness",
  47. "src/contract/money",
  48. "src/contract/dao",
  49. "src/contract/consensus",
  50. "src/contract/deployooor",
  51. "example/dchat",
  52. ]
  53. [dependencies]
  54. # Hard dependencies
  55. libc = "0.2.144"
  56. log = "0.4.19"
  57. thiserror = "1.0.40"
  58. # async-runtime
  59. async-std = {version = "1.12.0", features = ["attributes"], optional = true}
  60. async-trait = {version = "0.1.68", optional = true}
  61. futures = {version = "0.3.28", optional = true}
  62. smol = {version = "1.3.0", optional = true}
  63. # Networking
  64. futures-rustls = {version = "0.24.0", features = ["dangerous_configuration"], optional = true}
  65. iprange = {version = "0.6.7", optional = true}
  66. ipnet = {version = "2.7.2", optional = true}
  67. socket2 = {version = "0.5.3", optional = true, features = ["all"]}
  68. # TLS cert utilities
  69. ed25519-compact = {version = "2.0.4", features = ["pem"], optional = true}
  70. rcgen = {version = "0.10.0", features = ["pem"], optional = true}
  71. rustls-pemfile = {version = "1.0.2", optional = true}
  72. # Encoding
  73. bs58 = {version = "0.5.0", optional = true}
  74. hex = {version = "0.4.3", optional = true}
  75. serde_json = {version = "1.0.96", optional = true}
  76. serde = {version = "1.0.164", features = ["derive"], optional = true}
  77. structopt = {version= "0.3.26", optional = true}
  78. structopt-toml = {version= "0.5.1", optional = true}
  79. toml = {version = "0.7.4", optional = true}
  80. # Big float high precision arithmetics
  81. dashu = { version = "0.3.1", optional=true }
  82. # Utilities
  83. # TODO: check chrono usage and impl our own
  84. chrono = {version = "0.4.26", optional = true}
  85. darkfi-serial = {path = "src/serial", optional = true}
  86. darkfi-derive = {path = "src/serial/derive", optional = true}
  87. darkfi-derive-internal = {path = "src/serial/derive-internal", optional = true}
  88. indexmap = {version = "1.9.3", optional = true}
  89. itertools = {version = "0.10.5", optional = true}
  90. lazy_static = {version = "1.4.0", optional = true}
  91. # TODO: Test without serde
  92. url = {version = "2.4.0", features = ["serde"], optional = true}
  93. # Misc
  94. # TODO: Implement something simple and kill these deps
  95. indicatif = {version = "0.17.5", optional = true}
  96. simplelog = {version = "0.12.1", optional = true}
  97. ripemd = {version = "0.1.3", optional = true}
  98. # Websockets
  99. async-tungstenite = {version = "0.22.2", optional = true}
  100. # socks5
  101. fast-socks5 = {version = "0.4.3", optional = true}
  102. # Crypto
  103. rand = {version = "0.8.5", optional = true}
  104. blake3 = {version = "1.4.0", features = ["rayon"], optional = true}
  105. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  106. halo2_proofs = {version = "0.3.0", optional = true}
  107. halo2_gadgets = {version = "0.3.0", optional = true}
  108. # Smart contract runtime
  109. darkfi-sdk = {path = "src/sdk", optional = true}
  110. darkfi-sdk-py = {path = "src/darkfi-sdk-py", optional = true}
  111. wasmer = {version = "3.3.0", optional = true}
  112. wasmer-compiler-singlepass = {version = "3.3.0", optional = true}
  113. wasmer-middlewares = {version = "3.3.0", optional = true}
  114. # Wallet management
  115. sqlx = {version = "0.6.3", features = ["runtime-async-std-rustls", "sqlite"], optional = true}
  116. # Blockchain store
  117. sled = {version = "0.34.7", optional = true}
  118. sled-overlay = {version = "0.0.4", optional = true}
  119. [dev-dependencies]
  120. clap = {version = "4.3.3", features = ["derive"]}
  121. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  122. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  123. plotters = "0.3.4"
  124. easy-parallel = "3.3.0"
  125. prettytable-rs = "0.10.0"
  126. # -----BEGIN LIBRARY FEATURES-----
  127. [features]
  128. async-runtime = [
  129. "async-std",
  130. "async-trait",
  131. "futures",
  132. "smol",
  133. ]
  134. blockchain = [
  135. "blake3",
  136. "bs58", # <-- remove after we get rid of json for notifications
  137. "chrono",
  138. "crypto_api_chachapoly",
  139. "dashu",
  140. "halo2_proofs",
  141. "lazy_static",
  142. "rand",
  143. "sled",
  144. "sled-overlay",
  145. "sqlx",
  146. "url",
  147. "async-runtime",
  148. "darkfi-sdk",
  149. "darkfi-serial/crypto",
  150. "net",
  151. "rpc",
  152. "tx",
  153. "util",
  154. "wallet",
  155. "wasm-runtime",
  156. ]
  157. dht = [
  158. "blake3",
  159. "chrono",
  160. "rand",
  161. "async-runtime",
  162. "darkfi-serial",
  163. "darkfi-serial/collections",
  164. "darkfi-serial/hash",
  165. "net",
  166. ]
  167. event-graph = [
  168. "blake3",
  169. "chrono",
  170. "hex",
  171. "rand",
  172. "async-runtime",
  173. "darkfi-serial/hash",
  174. "net",
  175. ]
  176. net = [
  177. "ed25519-compact",
  178. "fast-socks5",
  179. "futures-rustls",
  180. "hex",
  181. "iprange",
  182. "ipnet",
  183. "structopt",
  184. "structopt-toml",
  185. "rand",
  186. "rcgen",
  187. "rustls-pemfile",
  188. "serde",
  189. "serde_json",
  190. "socket2",
  191. "url",
  192. "async-runtime",
  193. "darkfi-serial",
  194. "darkfi-serial/async",
  195. "darkfi-serial/url",
  196. "system",
  197. "util",
  198. ]
  199. raft = [
  200. "chrono",
  201. "rand",
  202. "sled",
  203. "async-runtime",
  204. "darkfi-serial",
  205. "net",
  206. "util",
  207. ]
  208. rpc = [
  209. "hex",
  210. "rand",
  211. "serde",
  212. "serde_json",
  213. "url",
  214. "async-runtime",
  215. "darkfi-serial",
  216. "net",
  217. ]
  218. system = [
  219. "rand",
  220. "async-runtime",
  221. ]
  222. tx = [
  223. "blake3",
  224. "rand",
  225. "async-runtime",
  226. "darkfi-sdk",
  227. "darkfi-serial",
  228. "zk",
  229. ]
  230. util = [
  231. "chrono",
  232. "simplelog",
  233. "serde",
  234. "serde_json",
  235. "toml",
  236. "url",
  237. "darkfi-serial",
  238. ]
  239. wallet = [
  240. "async-std",
  241. "rand",
  242. "sqlx",
  243. "darkfi-serial",
  244. "util",
  245. ]
  246. wasm-runtime = [
  247. "wasmer",
  248. "wasmer-compiler-singlepass",
  249. "wasmer-middlewares",
  250. "blockchain",
  251. "darkfi-sdk",
  252. ]
  253. websockets = [
  254. "async-tungstenite",
  255. ]
  256. zk = [
  257. "halo2_proofs",
  258. "halo2_gadgets",
  259. "rand",
  260. "darkfi-sdk",
  261. "zkas",
  262. ]
  263. zkas = [
  264. "indexmap",
  265. "itertools",
  266. "darkfi-serial",
  267. ]
  268. # -----END LIBRARY FEATURES-----
  269. [[example]]
  270. name = "net"
  271. path = "example/net.rs"
  272. required-features = ["async-runtime", "net"]
  273. [[example]]
  274. name = "zk"
  275. path = "example/zk.rs"
  276. required-features = ["zk"]
  277. [[example]]
  278. name = "zk-inclusion-proof"
  279. path = "example/zk-inclusion-proof.rs"
  280. required-features = ["zk"]
  281. [patch.crates-io]
  282. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"}
  283. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"}