Cargo.toml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. [package]
  2. name = "darkfi"
  3. version = "0.4.1"
  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. #[profile.release]
  15. #debug = true
  16. #lto = "fat"
  17. #codegen-units = 1
  18. [workspace]
  19. members = [
  20. "bin/zkas",
  21. "bin/darkfid",
  22. "bin/minerd",
  23. "bin/darkfi-mmproxy",
  24. "bin/drk",
  25. #"bin/fud/fu",
  26. #"bin/fud/fud",
  27. "bin/genev/genevd",
  28. "bin/genev/genev-cli",
  29. "bin/darkirc",
  30. #"bin/darkwallet",
  31. "bin/tau/taud",
  32. "bin/vanityaddr",
  33. "bin/lilith",
  34. "src/sdk",
  35. "src/sdk/python",
  36. "src/serial",
  37. "src/serial/derive",
  38. "src/serial/derive-internal",
  39. "src/contract/test-harness",
  40. "src/contract/money",
  41. "src/contract/dao",
  42. "src/contract/deployooor",
  43. "example/dchat/dchatd",
  44. ]
  45. [dependencies]
  46. # Hard dependencies
  47. libc = "0.2.155"
  48. log = "0.4.22"
  49. thiserror = "1.0.61"
  50. # async-runtime
  51. async-recursion = {version = "1.1.1", optional = true}
  52. async-trait = {version = "0.1", optional = true}
  53. futures = {version = "0.3.30", optional = true}
  54. smol = {version = "2.0.0", optional = true}
  55. pin-project-lite = {version = "0.2.14", optional = true}
  56. # Networking
  57. futures-rustls = {version = "0.26.0", default-features = false, features = ["logging", "tls12", "ring"], optional = true}
  58. # Pluggable Transports
  59. socket2 = {version = "0.5.7", features = ["all"], optional = true}
  60. arti-client = {version = "0.20.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "accel-sha1-asm", "onion-service-client", "onion-service-service"], optional = true}
  61. tor-error = {version = "0.20.0", optional = true}
  62. tor-rtcompat = {version = "0.20.0", features = ["async-std", "rustls"], optional = true}
  63. tor-hscrypto = {version = "0.20.0", optional = true}
  64. tor-hsservice = {version = "0.20.0", optional = true}
  65. tor-proto = {version = "0.20.0", optional = true}
  66. tor-cell = {version = "0.20.0", optional = true}
  67. # TLS cert utilities
  68. ed25519-compact = {version = "2.1.1", optional = true}
  69. rcgen = {version = "0.12.1", optional = true}
  70. rustls-pemfile = {version = "2.1.2", optional = true}
  71. x509-parser = {version = "0.16.0", features = ["validate", "verify"], optional = true}
  72. # Encoding
  73. bs58 = {version = "0.5.1", optional = true}
  74. serde = {version = "1.0.204", features = ["derive"], optional = true}
  75. tinyjson = {version = "2.5.1", optional = true}
  76. semver = {version = "1.0.23", optional = true}
  77. structopt = {version= "0.3.26", optional = true}
  78. structopt-toml = {version= "0.5.1", optional = true}
  79. toml = {version = "0.8.14", optional = true}
  80. # Utilities
  81. # TODO: check chrono usage and impl our own
  82. chrono = {version = "0.4.38", optional = true}
  83. darkfi-serial = {path = "src/serial", optional = true}
  84. darkfi-derive = {path = "src/serial/derive", optional = true}
  85. lazy_static = {version = "1.5.0", optional = true}
  86. num-bigint = {version = "0.4.6", optional = true}
  87. url = {version = "2.5.2", features = ["serde"], optional = true}
  88. # Misc
  89. simplelog = {version = "0.12.2", optional = true}
  90. regex = {version = "1.10.5", optional = true}
  91. # Crypto
  92. rand = {version = "0.8.5", optional = true}
  93. blake3 = {version = "1.5.1", features = ["rayon"], optional = true}
  94. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  95. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  96. halo2_gadgets = {version = "0.3.0", features = ["circuit-params"], optional = true}
  97. # Smart contract runtime
  98. darkfi-sdk = {path = "src/sdk", optional = true}
  99. wasmer = {version = "4.3.4", optional = true}
  100. wasmer-compiler-singlepass = {version = "4.3.4", optional = true}
  101. wasmer-middlewares = {version = "4.3.4", optional = true}
  102. # Blockchain store
  103. sled = {version = "0.34.7", optional = true}
  104. sled-overlay = {version = "0.1.3", optional = true}
  105. # Miner
  106. randomx = {git = "https://github.com/darkrenaissance/RandomX", optional = true}
  107. [dev-dependencies]
  108. clap = {version = "4.4.11", features = ["derive"]}
  109. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  110. halo2_gadgets = "0.3.0"
  111. plotters = "0.3.6"
  112. easy-parallel = "3.3.1"
  113. prettytable-rs = "0.10.0"
  114. # Used for benchmarks
  115. criterion = { version = "0.5.1", features = ["html_reports"] }
  116. # -----BEGIN LIBRARY FEATURES-----
  117. [features]
  118. async-daemonize = ["system"]
  119. async-serial = ["darkfi-serial/async"]
  120. async-sdk = [
  121. "darkfi-sdk/async",
  122. "async-serial",
  123. ]
  124. blockchain = [
  125. "sled",
  126. "sled-overlay",
  127. "num-bigint",
  128. "darkfi-serial/num-bigint",
  129. "tx",
  130. "util",
  131. ]
  132. validator = [
  133. "crypto_api_chachapoly",
  134. "lazy_static",
  135. "randomx",
  136. "rpc",
  137. "wasm-runtime",
  138. ]
  139. geode = [
  140. "blake3",
  141. "futures",
  142. "smol",
  143. ]
  144. event-graph = [
  145. "blake3",
  146. "num-bigint",
  147. "sled",
  148. "sled-overlay",
  149. "bs58",
  150. "darkfi-serial",
  151. "darkfi-serial/collections",
  152. "darkfi-serial/hash",
  153. "rpc",
  154. ]
  155. p2p-unix = []
  156. p2p-nym = []
  157. p2p-tcp = ["socket2"]
  158. p2p-tor = [
  159. "arti-client",
  160. "tor-hsservice",
  161. "tor-hscrypto",
  162. "tor-error",
  163. "tor-rtcompat",
  164. "tor-proto",
  165. "tor-cell",
  166. ]
  167. net = [
  168. "async-trait",
  169. "ed25519-compact",
  170. "futures",
  171. "futures-rustls",
  172. "rcgen",
  173. "regex",
  174. "rustls-pemfile",
  175. "semver",
  176. "serde",
  177. "structopt",
  178. "structopt-toml",
  179. "url",
  180. "x509-parser",
  181. "darkfi-serial/url",
  182. "async-serial",
  183. "system",
  184. "util",
  185. "p2p-tcp",
  186. "p2p-tor",
  187. #"p2p-nym",
  188. "p2p-unix",
  189. ]
  190. rpc = [
  191. "async-trait",
  192. "net",
  193. ]
  194. system = [
  195. "pin-project-lite",
  196. "rand",
  197. "smol",
  198. ]
  199. tx = [
  200. "blake3",
  201. "rand",
  202. "async-sdk",
  203. "async-serial",
  204. "zk",
  205. ]
  206. util = [
  207. "simplelog",
  208. "tinyjson",
  209. "darkfi-serial",
  210. ]
  211. wasm-runtime = [
  212. "wasmer",
  213. "wasmer-compiler-singlepass",
  214. "wasmer-middlewares",
  215. "darkfi-sdk",
  216. "blockchain",
  217. ]
  218. zk = [
  219. "halo2_proofs",
  220. "halo2_gadgets",
  221. "rand",
  222. "async-sdk",
  223. "zkas",
  224. ]
  225. zkas = [
  226. "darkfi-serial",
  227. ]
  228. # -----END LIBRARY FEATURES-----
  229. [patch.crates-io]
  230. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  231. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  232. # Temp smol-2.0 fix
  233. async-lock = {git="https://github.com/smol-rs/async-lock", rev="542831132f2c707aae1c380edd43452053433814"}
  234. # Forked "url" crate with added P2P schemas
  235. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  236. [[bench]]
  237. name = "zk_arith"
  238. harness = false
  239. path = "bench/zk_arith.rs"
  240. [[bench]]
  241. name = "zk_from_json"
  242. harness = false
  243. path = "bench/zk_from_json.rs"
  244. [[bench]]
  245. name = "sled"
  246. harness = false
  247. path = "bench/sled.rs"
  248. # Crossbeam SkipMap vs Mutex protected HashMap.
  249. # Uncomment to enable, and add the following to dev-dependencies:
  250. # crossbeam-skiplist = "0.1.3"
  251. # rand = "0.8.5"
  252. #[[bench]]
  253. #name = "crossbeam"
  254. #harness = false
  255. #path = "bench/crossbeam.rs"
  256. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  257. [workspace.lints.clippy]
  258. #arithmetic_side_effects = "warn"
  259. #eq_op = "warn"
  260. #float_cmp = "warn"
  261. # integer_division = "warn"
  262. #large_futures = "warn"
  263. #large_stack_arrays = "warn"
  264. #large_stack_frames = "warn"
  265. #lossy_float_literal = "warn"
  266. #manual_slice_size_calculation = "warn"
  267. #modulo_one = "warn"
  268. #out_of_bounds_indexing = "warn"
  269. #overflow_check_conditional = "warn"
  270. #recursive_format_impl = "warn"
  271. #unchecked_duration_subtraction = "warn"