Cargo.toml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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. simplelog = {version = "0.12.1", optional = true}
  95. # Crypto
  96. rand = {version = "0.8.5", optional = true}
  97. blake3 = {version = "1.4.0", features = ["rayon"], optional = true}
  98. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  99. halo2_proofs = {version = "0.3.0", optional = true}
  100. halo2_gadgets = {version = "0.3.0", optional = true}
  101. # Smart contract runtime
  102. darkfi-sdk = {path = "src/sdk", optional = true}
  103. wasmer = {version = "3.3.0", optional = true}
  104. wasmer-compiler-singlepass = {version = "3.3.0", optional = true}
  105. wasmer-middlewares = {version = "3.3.0", optional = true}
  106. # Wallet management
  107. rusqlite = {version = "0.29.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  108. libsqlite3-sys = {version = "0.26.0", features = ["bundled-sqlcipher-vendored-openssl"], optional = true}
  109. # Blockchain store
  110. sled = {version = "0.34.7", optional = true}
  111. sled-overlay = {version = "0.0.7", optional = true}
  112. # Temporary version lock
  113. curve25519-dalek = {version = "=4.0.0-rc.2", default-features = false, optional = true}
  114. [dev-dependencies]
  115. clap = {version = "4.3.3", features = ["derive"]}
  116. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  117. halo2_gadgets = {version = "0.3.0", features = ["test-dev-graph", "test-dependencies"]}
  118. plotters = "0.3.4"
  119. easy-parallel = "3.3.0"
  120. prettytable-rs = "0.10.0"
  121. # -----BEGIN LIBRARY FEATURES-----
  122. [features]
  123. p2p-transport-tcp = []
  124. p2p-transport-tor = ["arti-client", "tor-hscrypto"]
  125. p2p-transport-nym = []
  126. async-runtime = [
  127. "async-std",
  128. "async-trait",
  129. "futures",
  130. "smol",
  131. ]
  132. blockchain = [
  133. "blake3",
  134. "bs58", # <-- TODO: 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. "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. "rand",
  168. "async-runtime",
  169. "darkfi-serial/hash",
  170. "net",
  171. ]
  172. net = [
  173. "ed25519-compact",
  174. "async-rustls",
  175. "structopt",
  176. "structopt-toml",
  177. "rand",
  178. "rcgen",
  179. "rustls-pemfile",
  180. "x509-parser",
  181. "semver",
  182. "serde",
  183. "serde_json",
  184. "socket2",
  185. "url",
  186. "async-runtime",
  187. "darkfi-serial",
  188. "darkfi-serial/async",
  189. "darkfi-serial/url",
  190. "system",
  191. "util",
  192. "p2p-transport-tcp",
  193. "p2p-transport-tor",
  194. "p2p-transport-nym",
  195. ]
  196. raft = [
  197. "chrono",
  198. "rand",
  199. "sled",
  200. "async-runtime",
  201. "darkfi-serial",
  202. "net",
  203. "util",
  204. ]
  205. rpc = [
  206. "rand",
  207. "serde",
  208. "serde_json",
  209. "url",
  210. "async-runtime",
  211. "darkfi-serial",
  212. "net",
  213. ]
  214. system = [
  215. "rand",
  216. "async-runtime",
  217. ]
  218. tx = [
  219. "blake3",
  220. "rand",
  221. "async-runtime",
  222. "darkfi-sdk",
  223. "darkfi-serial",
  224. "zk",
  225. ]
  226. util = [
  227. "chrono",
  228. "simplelog",
  229. "serde",
  230. "serde_json",
  231. "toml",
  232. "url",
  233. "darkfi-serial",
  234. ]
  235. wallet = [
  236. "async-std",
  237. "rand",
  238. "rusqlite",
  239. "darkfi-serial",
  240. "util",
  241. ]
  242. wasm-runtime = [
  243. "wasmer",
  244. "wasmer-compiler-singlepass",
  245. "wasmer-middlewares",
  246. "blockchain",
  247. "darkfi-sdk",
  248. ]
  249. zk = [
  250. "halo2_proofs",
  251. "halo2_gadgets",
  252. "rand",
  253. "darkfi-sdk",
  254. "zkas",
  255. ]
  256. zkas = [
  257. "itertools",
  258. "darkfi-serial",
  259. ]
  260. # -----END LIBRARY FEATURES-----
  261. [[example]]
  262. name = "net"
  263. path = "example/net.rs"
  264. required-features = ["async-runtime", "net"]
  265. [[example]]
  266. name = "zk"
  267. path = "example/zk.rs"
  268. required-features = ["zk"]
  269. [[example]]
  270. name = "zk-inclusion-proof"
  271. path = "example/zk-inclusion-proof.rs"
  272. required-features = ["zk"]
  273. [patch.crates-io]
  274. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v3"}
  275. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v3"}