Cargo.toml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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. fxhash = {version = "0.2.1", optional = true}
  69. indexmap = {version = "1.8.1", optional = true}
  70. itertools = {version = "0.10.3", optional = true}
  71. darkfi-derive = {path = "src/util/derive", optional = true}
  72. darkfi-derive-internal = {path = "src/util/derive-internal", optional = true}
  73. chrono = {version = "0.4.19", optional = true}
  74. regex = {version = "1.1.9", optional = true}
  75. # Misc
  76. termion = {version = "1.5.6", optional = true}
  77. simplelog = {version = "0.12.0-alpha1", optional = true}
  78. # Websockets
  79. tungstenite = {version = "0.17.2", optional = true}
  80. async-tungstenite = {version = "0.17.2", optional = true}
  81. # socks5
  82. fast-socks5 = {git = "https://github.com/ghassmo/fast-socks5", optional = true}
  83. # Crypto
  84. bitvec = {version = "1.0.0", optional = true}
  85. rand = {version = "0.8.5", optional = true}
  86. blake3 = {version = "1.3.1", optional = true}
  87. sha2 = {version = "0.10.2", optional = true}
  88. group = {version = "0.11.0", optional = true}
  89. arrayvec = {version = "0.7.2", optional = true}
  90. blake2b_simd = {version = "1.0.0", optional = true}
  91. pasta_curves = {version = "0.3.0", optional = true}
  92. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  93. incrementalmerkletree = {version = "0.2.0", optional = true}
  94. halo2_proofs = {version = "0.1.0-beta.4", features = ["dev-graph", "gadget-traces", "sanity-checks"], optional = true}
  95. halo2_gadgets = {version = "0.1.0-beta.3", features = ["dev-graph", "test-dependencies"], optional = true}
  96. # Smart contract runtime
  97. drk-sdk = {path = "src/sdk", optional = true}
  98. wasmer = {version = "2.2.1", optional = true}
  99. wasmer-compiler-singlepass = {version = "2.2.1", optional = true}
  100. wasmer-middlewares = {version = "2.2.1", optional = true}
  101. # Wallet management
  102. sqlx = {version = "0.5.12", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
  103. libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true }
  104. # Blockchain store
  105. sled = {version = "0.34.7", optional = true}
  106. # Node utilities
  107. signal-hook = {version = "0.3.13", optional = true}
  108. signal-hook-async-std = {version = "0.2.2", optional = true}
  109. # Node protocol
  110. [dependencies.zeromq]
  111. version = "0.3.3"
  112. default-features = false
  113. features = ["async-std-runtime", "all-transport"]
  114. optional = true
  115. [dependencies.rocksdb]
  116. # TODO: Revert to upstream after bd966750ec861d687913d59a9939a1408ac53131 is merged.
  117. git = "https://github.com/parazyd/rust-rocksdb"
  118. rev = "bd966750ec861d687913d59a9939a1408ac53131"
  119. default-features = false
  120. features = ["zstd"]
  121. optional = true
  122. [dev-dependencies]
  123. clap = {version = "3.1.8", features = ["derive"]}
  124. [features]
  125. async-runtime = [
  126. "async-std",
  127. "async-channel",
  128. "async-executor",
  129. "async-trait",
  130. "futures",
  131. "smol",
  132. ]
  133. async-net = [
  134. "async-native-tls",
  135. "native-tls",
  136. ]
  137. websockets = [
  138. "async-tungstenite",
  139. "tungstenite",
  140. ]
  141. util = [
  142. "hex",
  143. "bincode",
  144. "serde",
  145. "toml",
  146. "url",
  147. "simplelog",
  148. "serde_json",
  149. "dirs",
  150. "num-bigint",
  151. "fxhash",
  152. "darkfi-derive",
  153. "darkfi-derive-internal",
  154. ]
  155. rpc = [
  156. "rand",
  157. "url",
  158. "fast-socks5",
  159. "async-net",
  160. "async-runtime",
  161. "websockets",
  162. "util",
  163. "net",
  164. ]
  165. blockchain = [
  166. "rocksdb",
  167. "sled",
  168. "chrono",
  169. "rand",
  170. "async-runtime",
  171. "util",
  172. "crypto",
  173. "net",
  174. "blockchain2",
  175. ]
  176. blockchain2 = [
  177. "blake3",
  178. "chrono",
  179. "indexmap",
  180. "sled",
  181. "crypto",
  182. "net",
  183. "util",
  184. ]
  185. system = [
  186. "fxhash",
  187. "rand",
  188. "async-runtime",
  189. ]
  190. net = [
  191. "fxhash",
  192. "socket2",
  193. "futures-rustls",
  194. "fast-socks5",
  195. "ed25519-compact",
  196. "rcgen",
  197. "regex",
  198. "rustls-pemfile",
  199. "util",
  200. "system",
  201. ]
  202. net2 = [
  203. "fxhash",
  204. "socket2",
  205. "futures-rustls",
  206. "fast-socks5",
  207. "ed25519-compact",
  208. "rcgen",
  209. "regex",
  210. "rustls-pemfile",
  211. "util",
  212. "system",
  213. ]
  214. crypto = [
  215. "bitvec",
  216. "blake3",
  217. "rand",
  218. "pasta_curves",
  219. "blake2b_simd",
  220. "incrementalmerkletree",
  221. "halo2_proofs",
  222. "halo2_gadgets",
  223. "subtle",
  224. "lazy_static",
  225. "group",
  226. "arrayvec",
  227. "crypto_api_chachapoly",
  228. "sha2",
  229. "bs58",
  230. "util",
  231. "zkas",
  232. ]
  233. wallet = [
  234. "sqlx",
  235. "libsqlite3-sys",
  236. "crypto",
  237. "util",
  238. ]
  239. wasm-runtime = [
  240. "drk-sdk",
  241. "wasmer",
  242. "wasmer-compiler-singlepass",
  243. "wasmer-middlewares",
  244. ]
  245. node = [
  246. "url",
  247. "bytes",
  248. "zeromq",
  249. "signal-hook",
  250. "signal-hook-async-std",
  251. "async-runtime",
  252. "blockchain",
  253. "crypto",
  254. "wallet",
  255. "util",
  256. "net",
  257. ]
  258. zkas = [
  259. "termion",
  260. "indexmap",
  261. "itertools",
  262. "util",
  263. ]
  264. raft = [
  265. "blake3",
  266. "sled",
  267. "util",
  268. "net",
  269. "rpc",
  270. ]
  271. [[example]]
  272. name = "net"
  273. path = "example/net.rs"
  274. required-features = ["async-runtime", "net"]
  275. [[example]]
  276. name = "tx"
  277. path = "example/tx.rs"
  278. required-features = ["node"]
  279. [[example]]
  280. name = "zk"
  281. path = "example/zk.rs"
  282. required-features = ["crypto"]