Cargo.toml 6.8 KB

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