Cargo.toml 8.1 KB

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