Cargo.toml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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/tau/taud",
  32. "bin/tau/tau-cli",
  33. #"bin/darkwiki/darkwikid",
  34. #"bin/darkwiki/darkwiki-cli",
  35. "bin/dhtd/dhtd",
  36. "bin/vanityaddr",
  37. "bin/lilith",
  38. "bin/zktool",
  39. "src/sdk",
  40. "src/sdk/python",
  41. "src/serial",
  42. "src/serial/derive",
  43. "src/serial/derive-internal",
  44. "src/contract/test-harness",
  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.19"
  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. async-rustls = {version = "0.4.0", features = ["dangerous_configuration"], optional = true}
  63. socket2 = {version = "0.5.3", optional = true, features = ["all"]}
  64. # Pluggable Transports
  65. arti-client = {version = "0.9.2", default-features = false, features = ["async-std", "rustls", "onion-service-client"], optional = true}
  66. tor-hscrypto = {version = "0.3.0", optional = true}
  67. # TLS cert utilities
  68. ed25519-compact = {version = "2.0.4", optional = true}
  69. rcgen = {version = "0.10.0", optional = true}
  70. rustls-pemfile = {version = "1.0.2", optional = true}
  71. x509-parser = {version = "0.15.0", features = ["validate", "verify"], optional = true}
  72. # Encoding
  73. bs58 = {version = "0.5.0", optional = true}
  74. serde_json = {version = "1.0.96", optional = true}
  75. serde = {version = "1.0.164", features = ["derive"], optional = true}
  76. semver = {version = "1.0.17", 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. 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. # Crypto
  97. rand = {version = "0.8.5", optional = true}
  98. blake3 = {version = "1.4.0", features = ["rayon"], optional = true}
  99. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  100. halo2_proofs = {version = "0.3.0", optional = true}
  101. halo2_gadgets = {version = "0.3.0", optional = true}
  102. # Smart contract runtime
  103. darkfi-sdk = {path = "src/sdk", optional = true}
  104. wasmer = {version = "3.3.0", optional = true}
  105. wasmer-compiler-singlepass = {version = "3.3.0", optional = true}
  106. wasmer-middlewares = {version = "3.3.0", optional = true}
  107. # Wallet management
  108. rusqlite = {version = "0.29.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  109. libsqlite3-sys = {version = "0.26.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  110. # Blockchain store
  111. sled = {version = "0.34.7", optional = true}
  112. sled-overlay = {version = "0.0.7", optional = true}
  113. # Temporary version lock
  114. curve25519-dalek = {version = "=4.0.0-rc.2", default-features = false, optional = true}
  115. [dev-dependencies]
  116. clap = {version = "4.3.3", features = ["derive"]}
  117. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  118. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  119. plotters = "0.3.4"
  120. easy-parallel = "3.3.0"
  121. prettytable-rs = "0.10.0"
  122. # -----BEGIN LIBRARY FEATURES-----
  123. [features]
  124. p2p-transport-tcp = []
  125. p2p-transport-tor = ["arti-client", "tor-hscrypto"]
  126. p2p-transport-nym = []
  127. async-runtime = [
  128. "async-std",
  129. "async-trait",
  130. "futures",
  131. "smol",
  132. ]
  133. blockchain = [
  134. "blake3",
  135. "bs58", # <-- TODO: remove after we get rid of json for notifications
  136. "chrono",
  137. "crypto_api_chachapoly",
  138. "dashu",
  139. "halo2_proofs",
  140. "lazy_static",
  141. "rand",
  142. "sled",
  143. "sled-overlay",
  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. "rand",
  169. "async-runtime",
  170. "darkfi-serial/hash",
  171. "net",
  172. ]
  173. net = [
  174. "ed25519-compact",
  175. "async-rustls",
  176. "structopt",
  177. "structopt-toml",
  178. "rand",
  179. "rcgen",
  180. "rustls-pemfile",
  181. "x509-parser",
  182. "semver",
  183. "serde",
  184. "serde_json",
  185. "socket2",
  186. "url",
  187. "async-runtime",
  188. "darkfi-serial",
  189. "darkfi-serial/async",
  190. "darkfi-serial/url",
  191. "system",
  192. "util",
  193. "p2p-transport-tcp",
  194. "p2p-transport-tor",
  195. "p2p-transport-nym",
  196. ]
  197. raft = [
  198. "chrono",
  199. "rand",
  200. "sled",
  201. "async-runtime",
  202. "darkfi-serial",
  203. "net",
  204. "util",
  205. ]
  206. rpc = [
  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. "rusqlite",
  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. zk = [
  251. "halo2_proofs",
  252. "halo2_gadgets",
  253. "rand",
  254. "darkfi-sdk",
  255. "zkas",
  256. ]
  257. zkas = [
  258. "itertools",
  259. "darkfi-serial",
  260. ]
  261. # -----END LIBRARY FEATURES-----
  262. [[example]]
  263. name = "net"
  264. path = "example/net.rs"
  265. required-features = ["async-runtime", "net"]
  266. [[example]]
  267. name = "zk"
  268. path = "example/zk.rs"
  269. required-features = ["zk"]
  270. [[example]]
  271. name = "zk-inclusion-proof"
  272. path = "example/zk-inclusion-proof.rs"
  273. required-features = ["zk"]
  274. [patch.crates-io]
  275. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"}
  276. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"}