Cargo.toml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. [package]
  2. name = "darkfi"
  3. version = "0.3.0"
  4. homepage = "https://dark.fi"
  5. description = "Anonymous. Uncensored. Sovereign."
  6. authors = ["darkfi <dev@dark.fi>"]
  7. repository = "https://github.com/darkrenaissance/darkfi"
  8. license = "AGPL-3.0-only"
  9. edition = "2021"
  10. [lib]
  11. name = "darkfi"
  12. [workspace]
  13. members = [
  14. "bin/zkas",
  15. "bin/cashierd",
  16. "bin/darkfid",
  17. "bin/darkfid2",
  18. "bin/drk",
  19. "bin/faucetd",
  20. "bin/gatewayd",
  21. "bin/ircd",
  22. "bin/dnetview",
  23. "bin/daod",
  24. "bin/dao-cli",
  25. "bin/tau/taud",
  26. "bin/tau/tau-cli",
  27. "bin/vanityaddr",
  28. "src/sdk",
  29. "src/util/derive",
  30. "src/util/derive-internal",
  31. ]
  32. [dependencies]
  33. # Hard dependencies
  34. libc = "0.2.123"
  35. log = "0.4.16"
  36. thiserror = "1.0.30"
  37. # async-runtime
  38. smol = {version = "1.2.5", optional = true}
  39. futures = {version = "0.3.21", optional = true}
  40. async-std = {version = "1.11.0", features = ["attributes"], optional = true}
  41. async-trait = {version = "0.1.53", optional = true}
  42. async-channel = {version = "1.6.1", optional = true}
  43. async-executor = {version = "1.4.1", optional = true}
  44. # async-net
  45. async-native-tls = {version = "0.4.0", optional = true}
  46. native-tls = {version = "0.2.10", optional = true}
  47. # Networking
  48. socket2 = {version = "0.4.4", optional = true}
  49. futures-rustls = {version = "0.22.1", features = ["dangerous_configuration"], optional = true}
  50. # TLS cert utilities
  51. ed25519-compact = {version = "1.0.11", features = ["pem"], optional = true}
  52. rcgen = {version = "0.9.2", features = ["pem"], optional = true}
  53. rustls-pemfile = {version = "0.3.0", optional = true}
  54. # Encoding
  55. hex = {version = "0.4.3", optional = true}
  56. bs58 = {version = "0.4.0", optional = true}
  57. toml = {version = "0.5.9", optional = true}
  58. bytes = {version = "1.1.0", optional = true}
  59. bincode = {version = "1.3.3", optional = true}
  60. num-bigint = {version = "0.4.3", optional = true}
  61. serde_json = {version = "1.0.79", optional = true}
  62. serde = {version = "1.0.136", features = ["derive"], optional = true}
  63. # Utilities
  64. url = {version = "2.2.2", features = ["serde"], optional = true}
  65. dirs = {version = "4.0.0", optional = true}
  66. subtle = {version = "2.4.1", optional = true}
  67. lazy_static = {version = "1.4.0", optional = true}
  68. lazy-init = {version = "0.5.0", optional = true}
  69. fxhash = {version = "0.2.1", optional = true}
  70. indexmap = {version = "1.8.1", optional = true}
  71. itertools = {version = "0.10.3", optional = true}
  72. darkfi-derive = {path = "src/util/derive", optional = true}
  73. darkfi-derive-internal = {path = "src/util/derive-internal", optional = true}
  74. chrono = {version = "0.4.19", optional = true}
  75. regex = {version = "1.1.9", optional = true}
  76. # Misc
  77. termion = {version = "1.5.6", optional = true}
  78. simplelog = {version = "0.12.0-alpha1", optional = true}
  79. # Websockets
  80. tungstenite = {version = "0.17.2", optional = true}
  81. async-tungstenite = {version = "0.17.2", optional = true}
  82. # socks5
  83. fast-socks5 = {git = "https://github.com/ghassmo/fast-socks5", optional = true}
  84. # Crypto
  85. bitvec = {version = "1.0.0", optional = true}
  86. rand = {version = "0.8.5", optional = true}
  87. blake3 = {version = "1.3.1", optional = true}
  88. sha2 = {version = "0.10.2", optional = true}
  89. group = {version = "0.11.0", optional = true}
  90. arrayvec = {version = "0.7.2", optional = true}
  91. blake2b_simd = {version = "1.0.0", optional = true}
  92. pasta_curves = {version = "0.3.0", optional = true}
  93. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  94. incrementalmerkletree = {version = "0.3.0-beta.2", optional = true}
  95. halo2_proofs = {version = "0.1.0-beta.4", features = ["dev-graph", "gadget-traces", "sanity-checks"], optional = true}
  96. halo2_gadgets = {version = "0.1.0-beta.3", features = ["dev-graph", "test-dependencies"], optional = true}
  97. # Smart contract runtime
  98. drk-sdk = {path = "src/sdk", optional = true}
  99. wasmer = {version = "2.2.1", optional = true}
  100. wasmer-compiler-singlepass = {version = "2.2.1", optional = true}
  101. wasmer-middlewares = {version = "2.2.1", optional = true}
  102. # Wallet management
  103. sqlx = {version = "0.5.12", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
  104. libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true }
  105. # Blockchain store
  106. sled = {version = "0.34.7", optional = true}
  107. # Node utilities
  108. signal-hook = {version = "0.3.13", optional = true}
  109. signal-hook-async-std = {version = "0.2.2", optional = true}
  110. # Node protocol
  111. [dependencies.zeromq]
  112. version = "0.3.3"
  113. default-features = false
  114. features = ["async-std-runtime", "all-transport"]
  115. optional = true
  116. [dependencies.rocksdb]
  117. # TODO: Revert to upstream after bd966750ec861d687913d59a9939a1408ac53131 is merged.
  118. git = "https://github.com/parazyd/rust-rocksdb"
  119. rev = "bd966750ec861d687913d59a9939a1408ac53131"
  120. default-features = false
  121. features = ["zstd"]
  122. optional = true
  123. [dev-dependencies]
  124. clap = {version = "3.1.8", features = ["derive"]}
  125. [features]
  126. async-runtime = [
  127. "async-std",
  128. "async-channel",
  129. "async-executor",
  130. "async-trait",
  131. "futures",
  132. "smol",
  133. ]
  134. async-net = [
  135. "async-native-tls",
  136. "native-tls",
  137. ]
  138. websockets = [
  139. "async-tungstenite",
  140. "tungstenite",
  141. ]
  142. util = [
  143. "hex",
  144. "bincode",
  145. "serde",
  146. "toml",
  147. "url",
  148. "simplelog",
  149. "serde_json",
  150. "dirs",
  151. "num-bigint",
  152. "fxhash",
  153. "darkfi-derive",
  154. "darkfi-derive-internal",
  155. ]
  156. rpc = [
  157. "rand",
  158. "url",
  159. "fast-socks5",
  160. "async-net",
  161. "async-runtime",
  162. "websockets",
  163. "util",
  164. "net",
  165. ]
  166. blockchain = [
  167. "blake3",
  168. "chrono",
  169. "indexmap",
  170. "sled",
  171. "crypto",
  172. "tx",
  173. "net",
  174. "util",
  175. ]
  176. system = [
  177. "fxhash",
  178. "rand",
  179. "async-runtime",
  180. ]
  181. net = [
  182. "fxhash",
  183. "socket2",
  184. "futures-rustls",
  185. "fast-socks5",
  186. "ed25519-compact",
  187. "rcgen",
  188. "regex",
  189. "rustls-pemfile",
  190. "util",
  191. "system",
  192. ]
  193. net2 = [
  194. "fxhash",
  195. "socket2",
  196. "futures-rustls",
  197. "fast-socks5",
  198. "ed25519-compact",
  199. "rcgen",
  200. "regex",
  201. "rustls-pemfile",
  202. "util",
  203. "system",
  204. ]
  205. crypto = [
  206. "bitvec",
  207. "blake3",
  208. "rand",
  209. "pasta_curves",
  210. "blake2b_simd",
  211. "incrementalmerkletree",
  212. "halo2_proofs",
  213. "halo2_gadgets",
  214. "subtle",
  215. "lazy_static",
  216. "group",
  217. "arrayvec",
  218. "crypto_api_chachapoly",
  219. "sha2",
  220. "bs58",
  221. "util",
  222. "zkas",
  223. ]
  224. wallet = [
  225. "sqlx",
  226. "libsqlite3-sys",
  227. "crypto",
  228. "util",
  229. ]
  230. wasm-runtime = [
  231. "drk-sdk",
  232. "wasmer",
  233. "wasmer-compiler-singlepass",
  234. "wasmer-middlewares",
  235. ]
  236. node = [
  237. "url",
  238. "bytes",
  239. "zeromq",
  240. "signal-hook",
  241. "signal-hook-async-std",
  242. "lazy-init",
  243. "async-runtime",
  244. "blockchain",
  245. "crypto",
  246. "wallet",
  247. "util",
  248. "net",
  249. ]
  250. zkas = [
  251. "termion",
  252. "indexmap",
  253. "itertools",
  254. "util",
  255. ]
  256. raft = [
  257. "blake3",
  258. "sled",
  259. "util",
  260. "net",
  261. "rpc",
  262. ]
  263. tx = [
  264. "crypto",
  265. "util",
  266. ]
  267. [[example]]
  268. name = "net"
  269. path = "example/net.rs"
  270. required-features = ["async-runtime", "net"]
  271. [[example]]
  272. name = "tx"
  273. path = "example/tx.rs"
  274. required-features = ["node"]
  275. [[example]]
  276. name = "zk"
  277. path = "example/zk.rs"
  278. required-features = ["crypto"]