Cargo.toml 8.3 KB

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