Cargo.toml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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/darkfid2",
  23. "bin/drk",
  24. "bin/faucetd",
  25. "bin/fud/fu",
  26. "bin/fud/fud",
  27. "bin/genev/genevd",
  28. "bin/genev/genev-cli",
  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/sdk/python",
  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. async-rustls = {version = "0.4.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. # Pluggable Transports
  69. arti-client = {version = "0.9.2", default-features = false, features = ["async-std", "rustls", "onion-service-client"], optional = true}
  70. tor-hscrypto = {version = "0.3.0", optional = true}
  71. # TODO: nym ( Read this to figure out impl https://github.com/ChainSafe/rust-libp2p-nym )
  72. # TLS cert utilities
  73. ed25519-compact = {version = "2.0.4", optional = true}
  74. rcgen = {version = "0.10.0", optional = true}
  75. rustls-pemfile = {version = "1.0.2", optional = true}
  76. x509-parser = {version = "0.15.0", features = ["validate", "verify"], optional = true}
  77. # Encoding
  78. bs58 = {version = "0.5.0", optional = true}
  79. hex = {version = "0.4.3", optional = true}
  80. serde_json = {version = "1.0.96", optional = true}
  81. serde = {version = "1.0.164", features = ["derive"], optional = true}
  82. semver = {version = "1.0.17", optional = true}
  83. structopt = {version= "0.3.26", optional = true}
  84. structopt-toml = {version= "0.5.1", optional = true}
  85. toml = {version = "0.7.4", optional = true}
  86. # Big float high precision arithmetics
  87. dashu = { version = "0.3.1", optional=true }
  88. # Utilities
  89. # TODO: check chrono usage and impl our own
  90. chrono = {version = "0.4.26", optional = true}
  91. darkfi-serial = {path = "src/serial", optional = true}
  92. darkfi-derive = {path = "src/serial/derive", optional = true}
  93. darkfi-derive-internal = {path = "src/serial/derive-internal", optional = true}
  94. indexmap = {version = "1.9.3", optional = true}
  95. itertools = {version = "0.10.5", optional = true}
  96. lazy_static = {version = "1.4.0", optional = true}
  97. # TODO: Test without serde
  98. url = {version = "2.4.0", features = ["serde"], optional = true}
  99. # Misc
  100. # TODO: Implement something simple and kill these deps
  101. indicatif = {version = "0.17.5", optional = true}
  102. simplelog = {version = "0.12.1", optional = true}
  103. ripemd = {version = "0.1.3", optional = true}
  104. # Crypto
  105. rand = {version = "0.8.5", optional = true}
  106. blake3 = {version = "1.4.0", features = ["rayon"], optional = true}
  107. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  108. halo2_proofs = {version = "0.3.0", optional = true}
  109. halo2_gadgets = {version = "0.3.0", optional = true}
  110. # Smart contract runtime
  111. darkfi-sdk = {path = "src/sdk", optional = true}
  112. wasmer = {version = "3.3.0", optional = true}
  113. wasmer-compiler-singlepass = {version = "3.3.0", optional = true}
  114. wasmer-middlewares = {version = "3.3.0", optional = true}
  115. # Wallet management
  116. rusqlite = {version = "0.29.0", features = ["bundled-sqlcipher"], optional = true}
  117. libsqlite3-sys = {version = "0.26.0", features = ["bundled-sqlcipher"], optional = true}
  118. # Blockchain store
  119. sled = {version = "0.34.7", optional = true}
  120. sled-overlay = {version = "0.0.7", optional = true}
  121. # Temporary version lock
  122. curve25519-dalek = {version = "=4.0.0-rc.2", default-features = false, optional = true}
  123. [dev-dependencies]
  124. clap = {version = "4.3.3", features = ["derive"]}
  125. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  126. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  127. plotters = "0.3.4"
  128. easy-parallel = "3.3.0"
  129. prettytable-rs = "0.10.0"
  130. # -----BEGIN LIBRARY FEATURES-----
  131. [features]
  132. p2p-transport-tcp = []
  133. p2p-transport-tor = ["arti-client", "tor-hscrypto"]
  134. p2p-transport-nym = []
  135. async-runtime = [
  136. "async-std",
  137. "async-trait",
  138. "futures",
  139. "smol",
  140. ]
  141. blockchain = [
  142. "blake3",
  143. "bs58", # <-- TODO: remove after we get rid of json for notifications
  144. "chrono",
  145. "crypto_api_chachapoly",
  146. "dashu",
  147. "halo2_proofs",
  148. "lazy_static",
  149. "rand",
  150. "sled",
  151. "sled-overlay",
  152. "url",
  153. "async-runtime",
  154. "darkfi-sdk",
  155. "darkfi-serial/crypto",
  156. "net",
  157. "rpc",
  158. "tx",
  159. "util",
  160. "wallet",
  161. "wasm-runtime",
  162. ]
  163. dht = [
  164. "blake3",
  165. "chrono",
  166. "rand",
  167. "async-runtime",
  168. "darkfi-serial",
  169. "darkfi-serial/collections",
  170. "darkfi-serial/hash",
  171. "net",
  172. ]
  173. event-graph = [
  174. "blake3",
  175. "chrono",
  176. "hex",
  177. "rand",
  178. "async-runtime",
  179. "darkfi-serial/hash",
  180. "net",
  181. ]
  182. net = [
  183. "ed25519-compact",
  184. "async-rustls",
  185. "hex",
  186. "iprange",
  187. "ipnet",
  188. "structopt",
  189. "structopt-toml",
  190. "rand",
  191. "rcgen",
  192. "rustls-pemfile",
  193. "x509-parser",
  194. "semver",
  195. "serde",
  196. "serde_json",
  197. "socket2",
  198. "url",
  199. "async-runtime",
  200. "darkfi-serial",
  201. "darkfi-serial/async",
  202. "darkfi-serial/url",
  203. "system",
  204. "util",
  205. "p2p-transport-tcp",
  206. "p2p-transport-tor",
  207. "p2p-transport-nym",
  208. ]
  209. raft = [
  210. "chrono",
  211. "rand",
  212. "sled",
  213. "async-runtime",
  214. "darkfi-serial",
  215. "net",
  216. "util",
  217. ]
  218. rpc = [
  219. "hex",
  220. "rand",
  221. "serde",
  222. "serde_json",
  223. "url",
  224. "async-runtime",
  225. "darkfi-serial",
  226. "net",
  227. ]
  228. system = [
  229. "rand",
  230. "async-runtime",
  231. ]
  232. tx = [
  233. "blake3",
  234. "rand",
  235. "async-runtime",
  236. "darkfi-sdk",
  237. "darkfi-serial",
  238. "zk",
  239. ]
  240. util = [
  241. "chrono",
  242. "simplelog",
  243. "serde",
  244. "serde_json",
  245. "toml",
  246. "url",
  247. "darkfi-serial",
  248. ]
  249. wallet = [
  250. "async-std",
  251. "rand",
  252. "rusqlite",
  253. "darkfi-serial",
  254. "util",
  255. ]
  256. wasm-runtime = [
  257. "wasmer",
  258. "wasmer-compiler-singlepass",
  259. "wasmer-middlewares",
  260. "blockchain",
  261. "darkfi-sdk",
  262. ]
  263. zk = [
  264. "halo2_proofs",
  265. "halo2_gadgets",
  266. "rand",
  267. "darkfi-sdk",
  268. "zkas",
  269. ]
  270. zkas = [
  271. "indexmap",
  272. "itertools",
  273. "darkfi-serial",
  274. ]
  275. # -----END LIBRARY FEATURES-----
  276. [[example]]
  277. name = "net"
  278. path = "example/net.rs"
  279. required-features = ["async-runtime", "net"]
  280. [[example]]
  281. name = "zk"
  282. path = "example/zk.rs"
  283. required-features = ["zk"]
  284. [[example]]
  285. name = "zk-inclusion-proof"
  286. path = "example/zk-inclusion-proof.rs"
  287. required-features = ["zk"]
  288. [patch.crates-io]
  289. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"}
  290. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"}