Cargo.toml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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. #[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/explorer/explorerd",
  24. "bin/darkfi-mmproxy",
  25. "bin/drk",
  26. "bin/fud/fu",
  27. "bin/fud/fud",
  28. "bin/genev/genevd",
  29. "bin/genev/genev-cli",
  30. "bin/darkirc",
  31. #"bin/darkwallet",
  32. "bin/tau/taud",
  33. "bin/vanityaddr",
  34. "bin/lilith",
  35. "src/sdk",
  36. "src/sdk/python",
  37. #"src/serial",
  38. #"src/serial/derive",
  39. #"src/serial/derive-internal",
  40. "src/contract/test-harness",
  41. "src/contract/money",
  42. "src/contract/dao",
  43. "src/contract/deployooor",
  44. "example/dchat/dchatd",
  45. ]
  46. [dependencies]
  47. # Hard dependencies
  48. libc = "0.2.172"
  49. log = "0.4.27"
  50. thiserror = "2.0.12"
  51. # async-runtime
  52. async-recursion = {version = "1.1.1", optional = true}
  53. async-trait = {version = "0.1.88", optional = true}
  54. futures = {version = "0.3.31", optional = true}
  55. smol = {version = "2.0.2", optional = true}
  56. pin-project-lite = {version = "0.2.16", optional = true}
  57. # Networking
  58. futures-rustls = {version = "0.26.0", default-features = false, features = ["logging", "tls12", "ring"], optional = true}
  59. # Pluggable Transports
  60. socket2 = {version = "0.5.9", features = ["all"], optional = true}
  61. arti-client = {version = "0.30.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "onion-service-client", "onion-service-service"], optional = true}
  62. tor-error = {version = "0.30.0", optional = true}
  63. tor-rtcompat = {version = "0.30.0", features = ["async-std", "rustls"], optional = true}
  64. tor-hscrypto = {version = "0.30.0", optional = true}
  65. tor-hsservice = {version = "0.30.0", optional = true}
  66. tor-proto = {version = "0.30.0", optional = true}
  67. tor-cell = {version = "0.30.0", optional = true}
  68. # TLS cert utilities
  69. ed25519-compact = {version = "2.1.1", optional = true}
  70. rcgen = {version = "0.12.1", optional = true}
  71. rustls-pemfile = {version = "2.2.0", optional = true}
  72. x509-parser = {version = "0.17.0", features = ["validate", "verify"], optional = true}
  73. # Encoding
  74. bs58 = {version = "0.5.1", optional = true}
  75. serde = {version = "1.0.219", features = ["derive"], optional = true}
  76. tinyjson = {version = "2.5.1", optional = true}
  77. httparse = {version = "1.10.1", optional = true}
  78. semver = {version = "1.0.26", optional = true}
  79. structopt = {version= "0.3.26", optional = true}
  80. structopt-toml = {version= "0.5.1", optional = true}
  81. toml = {version = "0.8.22", optional = true}
  82. # Utilities
  83. #darkfi-serial = {path = "src/serial", optional = true}
  84. #darkfi-derive = {path = "src/serial/derive", optional = true}
  85. darkfi-serial = {version = "0.4.2", optional = true}
  86. darkfi-derive = {version = "0.4.2", optional = true}
  87. # TODO: check chrono usage and impl our own
  88. chrono = {version = "0.4.41", optional = true}
  89. lazy_static = {version = "1.5.0", optional = true}
  90. num-bigint = {version = "0.4.6", optional = true}
  91. url = {version = "2.5.4", features = ["serde"], optional = true}
  92. # Misc
  93. simplelog = {version = "0.12.2", optional = true}
  94. regex = {version = "1.11.1", optional = true}
  95. # Crypto
  96. rand = {version = "0.8.5", optional = true}
  97. blake3 = {version = "1.8.2", features = ["rayon"], optional = true}
  98. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  99. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  100. halo2_gadgets = {version = "0.3.1", features = ["circuit-params"], optional = true}
  101. # Smart contract runtime
  102. darkfi-sdk = {path = "src/sdk", optional = true}
  103. wasmer = {version = "6.0.0", features = ["singlepass"], optional = true}
  104. wasmer-compiler-singlepass = {version = "6.0.0", optional = true}
  105. wasmer-middlewares = {version = "6.0.0", optional = true}
  106. # Blockchain store
  107. sled-overlay = {version = "0.1.7", optional = true}
  108. # Miner
  109. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", optional = true}
  110. monero = {version = "0.21.0", optional = true}
  111. tiny-keccak = { version = "2.0.2", features = ["keccak"], optional = true }
  112. [dev-dependencies]
  113. clap = {version = "4.4.11", features = ["derive"]}
  114. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  115. halo2_gadgets = "0.3.1"
  116. plotters = "0.3.7"
  117. easy-parallel = "3.3.1"
  118. prettytable-rs = "0.10.0"
  119. # Used for benchmarks
  120. criterion = { version = "0.5.1", features = ["html_reports"] }
  121. # -----BEGIN LIBRARY FEATURES-----
  122. [features]
  123. async-daemonize = ["system"]
  124. async-serial = ["darkfi-serial/async"]
  125. async-sdk = [
  126. "darkfi-sdk/async",
  127. "async-serial",
  128. ]
  129. blockchain = [
  130. "sled-overlay/serial",
  131. "monero",
  132. "num-bigint",
  133. "tiny-keccak",
  134. "darkfi-serial/num-bigint",
  135. "tx",
  136. "util",
  137. ]
  138. validator = [
  139. "crypto_api_chachapoly",
  140. "lazy_static",
  141. "randomx",
  142. "smol",
  143. "wasm-runtime",
  144. ]
  145. geode = [
  146. "blake3",
  147. "bs58",
  148. "futures",
  149. "smol",
  150. ]
  151. event-graph = [
  152. "blake3",
  153. "num-bigint",
  154. "sled-overlay",
  155. "smol",
  156. "tinyjson",
  157. "bs58",
  158. "darkfi-serial",
  159. "darkfi-serial/collections",
  160. "darkfi-serial/hash",
  161. "rpc",
  162. ]
  163. p2p-nym = []
  164. p2p-tor = [
  165. "arti-client",
  166. "tor-hsservice",
  167. "tor-hscrypto",
  168. "tor-error",
  169. "tor-rtcompat",
  170. "tor-proto",
  171. "tor-cell",
  172. ]
  173. net-defaults = [
  174. "async-trait",
  175. "ed25519-compact",
  176. "futures",
  177. "futures-rustls",
  178. "rcgen",
  179. "regex",
  180. "rustls-pemfile",
  181. "semver",
  182. "serde",
  183. "socket2",
  184. "structopt",
  185. "structopt-toml",
  186. "url",
  187. "x509-parser",
  188. "darkfi-serial/url",
  189. "async-serial",
  190. "system",
  191. "util",
  192. "p2p-tor",
  193. #"p2p-nym",
  194. "p2p-i2p",
  195. ]
  196. p2p-unix = []
  197. p2p-socks5 = []
  198. p2p-i2p = [
  199. "p2p-socks5"
  200. ]
  201. net = ["net-defaults"]
  202. rpc = [
  203. "async-trait",
  204. "httparse",
  205. "net",
  206. ]
  207. system = [
  208. "pin-project-lite",
  209. "rand",
  210. "smol",
  211. ]
  212. tx = [
  213. "blake3",
  214. "rand",
  215. "async-sdk",
  216. "async-serial",
  217. "zk",
  218. ]
  219. util = [
  220. "simplelog",
  221. "tinyjson",
  222. "darkfi-serial",
  223. ]
  224. wasm-runtime = [
  225. "wasmer",
  226. "wasmer-compiler-singlepass",
  227. "wasmer-middlewares",
  228. "darkfi-sdk/wasm",
  229. "blockchain",
  230. ]
  231. zk = [
  232. "halo2_proofs",
  233. "halo2_gadgets",
  234. "rand",
  235. "async-sdk",
  236. "zkas",
  237. ]
  238. zkas = [
  239. "darkfi-serial",
  240. ]
  241. dht = [
  242. "async-sdk",
  243. "blake3",
  244. "bs58",
  245. "futures",
  246. "num-bigint",
  247. "serde",
  248. "structopt",
  249. "structopt-toml",
  250. "smol",
  251. "darkfi-serial",
  252. "net",
  253. ]
  254. # Could not get this to work. Complains manifest-key is ignored.
  255. #[target.'cfg(target_family = "unix")'.features]
  256. #net = ["net-defaults", "p2p-unix"]
  257. #
  258. #[target.'cfg(target_family = "windows")'.features]
  259. #net = ["net-defaults"]
  260. # -----END LIBRARY FEATURES-----
  261. [patch.crates-io]
  262. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  263. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  264. # Temp smol-2.0 fix
  265. async-lock = {git="https://github.com/smol-rs/async-lock", rev="542831132f2c707aae1c380edd43452053433814"}
  266. # Forked "url" crate with added P2P schemas
  267. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  268. [[bench]]
  269. name = "zk_arith"
  270. harness = false
  271. path = "bench/zk_arith.rs"
  272. [[bench]]
  273. name = "zk_from_json"
  274. harness = false
  275. path = "bench/zk_from_json.rs"
  276. [[bench]]
  277. name = "sled"
  278. harness = false
  279. path = "bench/sled.rs"
  280. # Crossbeam SkipMap vs Mutex protected HashMap.
  281. # Uncomment to enable, and add the following to dev-dependencies:
  282. # crossbeam-skiplist = "0.1.3"
  283. # rand = "0.8.5"
  284. #[[bench]]
  285. #name = "crossbeam"
  286. #harness = false
  287. #path = "bench/crossbeam.rs"
  288. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  289. [workspace.lints.clippy]
  290. #arithmetic_side_effects = "warn"
  291. #eq_op = "warn"
  292. #float_cmp = "warn"
  293. # integer_division = "warn"
  294. #large_futures = "warn"
  295. #large_stack_arrays = "warn"
  296. #large_stack_frames = "warn"
  297. #lossy_float_literal = "warn"
  298. #manual_slice_size_calculation = "warn"
  299. #modulo_one = "warn"
  300. #out_of_bounds_indexing = "warn"
  301. #overflow_check_conditional = "warn"
  302. #recursive_format_impl = "warn"
  303. #unchecked_duration_subtraction = "warn"