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