Cargo.toml 6.8 KB

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