Cargo.toml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. [package]
  2. name = "darkfi"
  3. version = "0.5.0"
  4. homepage = "https://dark.fi"
  5. description = "Anonymous. Uncensored. Sovereign."
  6. authors = ["Dyne.org foundation <foundation@dyne.org>"]
  7. repository = "https://codeberg.org/darkrenaissance/darkfi"
  8. license = "AGPL-3.0-only"
  9. edition = "2021"
  10. [lib]
  11. name = "darkfi"
  12. doctest = false
  13. bench = false
  14. [workspace]
  15. members = [
  16. "bin/zkas",
  17. "bin/darkfid",
  18. "bin/explorer/explorerd",
  19. "bin/drk",
  20. "bin/fud/fu",
  21. "bin/fud/fud",
  22. "bin/genev/genevd",
  23. "bin/genev/genev-cli",
  24. "bin/darkirc",
  25. "bin/tau/taud",
  26. "bin/vanityaddr",
  27. "bin/lilith",
  28. "src/sdk",
  29. "src/sdk/python",
  30. "src/serial",
  31. "src/serial/derive",
  32. "src/serial/derive-internal",
  33. "src/contract/test-harness",
  34. "src/contract/money",
  35. "src/contract/dao",
  36. "src/contract/deployooor",
  37. "example/dchat/dchatd",
  38. ]
  39. [dependencies]
  40. # Hard dependencies
  41. libc = "0.2.178"
  42. thiserror = "2.0.17"
  43. tracing = "0.1.44"
  44. # async-runtime
  45. async-trait = {version = "0.1.89", optional = true}
  46. futures = {version = "0.3.31", optional = true}
  47. smol = {version = "2.0.2", optional = true}
  48. pin-project-lite = {version = "0.2.16", optional = true}
  49. # Networking
  50. futures-rustls = {version = "0.26.0", default-features = false, features = ["logging", "tls12", "ring"], optional = true}
  51. # Pluggable Transports
  52. socket2 = {version = "0.6.1", features = ["all"], optional = true}
  53. arti-client = {version = "0.37.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "onion-service-client", "onion-service-service"], optional = true}
  54. tor-error = {version = "0.37.0", optional = true}
  55. tor-rtcompat = {version = "0.37.0", features = ["async-std", "rustls"], optional = true}
  56. tor-hscrypto = {version = "0.37.0", optional = true}
  57. tor-hsservice = {version = "0.37.0", optional = true}
  58. tor-proto = {version = "0.37.0", optional = true}
  59. tor-cell = {version = "0.37.0", optional = true}
  60. quinn = {git="https://github.com/parazyd/quinn", branch="no-tokio", default-features = false, features = ["rustls-ring", "runtime-smol"], optional = true}
  61. # TLS cert utilities
  62. ed25519-compact = {version = "2.2.0", optional = true}
  63. rcgen = {version = "0.14.6", optional = true, features = ["pem"]}
  64. x509-parser = {version = "0.18.0", features = ["validate", "verify"], optional = true}
  65. # Encoding
  66. bs58 = {version = "0.5.1", optional = true}
  67. hex = {version = "0.4.3", optional = true}
  68. serde = {version = "1.0.228", features = ["derive"], optional = true}
  69. tinyjson = {version = "2.5.1", optional = true}
  70. httparse = {version = "1.10.1", optional = true}
  71. primitive-types = {version = "0.14.0", optional = true}
  72. semver = {version = "1.0.27", optional = true}
  73. structopt = {version= "0.3.26", optional = true}
  74. structopt-toml = {version= "0.5.1", optional = true}
  75. toml = {version = "0.9.8", optional = true}
  76. # Utilities
  77. darkfi-serial = {path = "src/serial", optional = true}
  78. lazy_static = {version = "1.5.0", optional = true}
  79. num-bigint = {version = "0.4.6", optional = true}
  80. url = {version = "2.5.7", features = ["serde"], optional = true}
  81. # Misc
  82. tracing-subscriber = { version = "0.3.22", default-features = false, features = ["fmt"], optional = true }
  83. tracing-appender = {version = "0.2.4", optional = true }
  84. nu-ansi-term = {version = "0.50.3", optional = true}
  85. # Crypto
  86. rand = {version = "0.8.5", optional = true}
  87. blake3 = {version = "1.8.2", features = ["rayon"], optional = true}
  88. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  89. halo2_proofs = {version = "0.3.2", features = ["circuit-params"], optional = true}
  90. halo2_gadgets = {version = "0.4.0", features = ["circuit-params"], optional = true}
  91. sha2 = {version = "0.10.9", optional = true}
  92. # Smart contract runtime
  93. darkfi-sdk = {path = "src/sdk", optional = true}
  94. wasmer = {version = "6.1.0", features = ["singlepass"], optional = true}
  95. wasmer-compiler-singlepass = {version = "6.1.0", optional = true}
  96. wasmer-middlewares = {version = "6.1.0", optional = true}
  97. # Blockchain store
  98. sled-overlay = {version = "0.1.15", optional = true}
  99. # Miner
  100. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", rev = "0e31d5a", optional = true}
  101. monero = {version = "0.21.0", optional = true}
  102. tiny-keccak = { version = "2.0.2", features = ["keccak"], optional = true }
  103. [dev-dependencies]
  104. clap = {version = "4.4.11", features = ["derive"]}
  105. halo2_proofs = {version = "0.3.2", features = ["circuit-params", "dev-graph", "sanity-checks"]}
  106. halo2_gadgets = {version = "0.4.0", features = ["circuit-params", "test-dependencies"]}
  107. plotters = "0.3.7"
  108. easy-parallel = "3.3.1"
  109. prettytable-rs = "0.10.0"
  110. # Used for benchmarks
  111. criterion = {version = "0.8.1", features = ["html_reports"]}
  112. # -----BEGIN LIBRARY FEATURES-----
  113. [features]
  114. async-daemonize = ["system"]
  115. async-serial = ["darkfi-serial/async"]
  116. async-sdk = [
  117. "darkfi-sdk/async",
  118. "async-serial",
  119. ]
  120. blockchain = [
  121. "sled-overlay",
  122. "monero",
  123. "num-bigint",
  124. "primitive-types",
  125. "sha2",
  126. "tiny-keccak",
  127. "darkfi-serial/num-bigint",
  128. "darkfi-serial/sled-overlay",
  129. "tx",
  130. "util",
  131. ]
  132. validator = [
  133. "crypto_api_chachapoly",
  134. "hex",
  135. "lazy_static",
  136. "monero",
  137. "randomx",
  138. "smol",
  139. "blockchain",
  140. "system",
  141. "wasm-runtime",
  142. ]
  143. geode = [
  144. "blake3",
  145. "bs58",
  146. "futures",
  147. "smol",
  148. ]
  149. event-graph = [
  150. "blake3",
  151. "num-bigint",
  152. "sled-overlay",
  153. "smol",
  154. "tinyjson",
  155. "bs58",
  156. "darkfi-serial",
  157. "darkfi-serial/collections",
  158. "darkfi-serial/hash",
  159. "net",
  160. ]
  161. p2p-nym = []
  162. p2p-tor = [
  163. "arti-client",
  164. "tor-hsservice",
  165. "tor-hscrypto",
  166. "tor-error",
  167. "tor-rtcompat",
  168. "tor-proto",
  169. "tor-cell",
  170. ]
  171. net-defaults = [
  172. "async-trait",
  173. "ed25519-compact",
  174. "futures",
  175. "futures-rustls",
  176. "rcgen",
  177. "semver",
  178. "serde",
  179. "socket2",
  180. "structopt",
  181. "structopt-toml",
  182. "url",
  183. "x509-parser",
  184. "darkfi-serial/url",
  185. "async-serial",
  186. "system",
  187. "util",
  188. "p2p-tor",
  189. #"p2p-nym",
  190. "p2p-i2p",
  191. "p2p-socks5",
  192. "p2p-unix",
  193. "p2p-quic",
  194. ]
  195. p2p-unix = []
  196. p2p-socks5 = []
  197. p2p-i2p = [
  198. "p2p-socks5"
  199. ]
  200. p2p-quic = [
  201. "quinn"
  202. ]
  203. net = ["net-defaults"]
  204. rpc = [
  205. "async-trait",
  206. "httparse",
  207. "net",
  208. ]
  209. system = [
  210. "futures",
  211. "pin-project-lite",
  212. "rand",
  213. "smol",
  214. ]
  215. tx = [
  216. "blake3",
  217. "async-sdk",
  218. "async-serial",
  219. "zk",
  220. ]
  221. util = [
  222. "tinyjson",
  223. "tracing-subscriber",
  224. "tracing-appender",
  225. "nu-ansi-term",
  226. "smol",
  227. "darkfi-serial",
  228. ]
  229. wasm-runtime = [
  230. "wasmer",
  231. "wasmer-compiler-singlepass",
  232. "wasmer-middlewares",
  233. "darkfi-sdk/wasm",
  234. "blockchain",
  235. ]
  236. zk = [
  237. "halo2_proofs",
  238. "halo2_gadgets",
  239. "rand",
  240. "async-sdk",
  241. "zkas",
  242. ]
  243. zkas = [
  244. "darkfi-serial",
  245. ]
  246. dht = [
  247. "async-sdk",
  248. "blake3",
  249. "bs58",
  250. "futures",
  251. "num-bigint",
  252. "serde",
  253. "structopt",
  254. "structopt-toml",
  255. "smol",
  256. "darkfi-serial",
  257. "net",
  258. ]
  259. # -----END LIBRARY FEATURES-----
  260. [patch.crates-io]
  261. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v032"}
  262. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v032"}
  263. # Forked "url" crate with added P2P schemas
  264. url = {git="https://github.com/darkrenaissance/rust-url", branch="v257"}
  265. [[bench]]
  266. name = "zk_arith"
  267. harness = false
  268. path = "bench/zk_arith.rs"
  269. [[bench]]
  270. name = "zk_from_json"
  271. harness = false
  272. path = "bench/zk_from_json.rs"
  273. [[bench]]
  274. name = "sled"
  275. harness = false
  276. path = "bench/sled.rs"
  277. # Crossbeam SkipMap vs Mutex protected HashMap.
  278. # Uncomment to enable, and add the following to dev-dependencies:
  279. # crossbeam-skiplist = "0.1.3"
  280. # rand = "0.8.5"
  281. #[[bench]]
  282. #name = "crossbeam"
  283. #harness = false
  284. #path = "bench/crossbeam.rs"
  285. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  286. [workspace.lints.clippy]
  287. #arithmetic_side_effects = "warn"
  288. #eq_op = "warn"
  289. #float_cmp = "warn"
  290. # integer_division = "warn"
  291. #large_futures = "warn"
  292. #large_stack_arrays = "warn"
  293. #large_stack_frames = "warn"
  294. #lossy_float_literal = "warn"
  295. #manual_slice_size_calculation = "warn"
  296. #modulo_one = "warn"
  297. #out_of_bounds_indexing = "warn"
  298. #overflow_check_conditional = "warn"
  299. #recursive_format_impl = "warn"
  300. #unchecked_duration_subtraction = "warn"