Cargo.toml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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/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.29.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "onion-service-client", "onion-service-service"], optional = true}
  62. tor-error = {version = "0.29.0", optional = true}
  63. tor-rtcompat = {version = "0.29.0", features = ["async-std", "rustls"], optional = true}
  64. tor-hscrypto = {version = "0.29.0", optional = true}
  65. tor-hsservice = {version = "0.29.0", optional = true}
  66. tor-proto = {version = "0.29.0", optional = true}
  67. tor-cell = {version = "0.29.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.20", 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.40", 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.1", 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-beta.1", features = ["singlepass"], optional = true}
  104. wasmer-compiler-singlepass = {version = "6.0.0-beta.1", optional = true}
  105. wasmer-middlewares = {version = "6.0.0-beta.1", optional = true}
  106. # Blockchain store
  107. sled-overlay = {version = "0.1.6", optional = true}
  108. # Miner
  109. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", optional = true}
  110. [dev-dependencies]
  111. clap = {version = "4.4.11", features = ["derive"]}
  112. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  113. halo2_gadgets = "0.3.1"
  114. plotters = "0.3.7"
  115. easy-parallel = "3.3.1"
  116. prettytable-rs = "0.10.0"
  117. # Used for benchmarks
  118. criterion = { version = "0.5.1", features = ["html_reports"] }
  119. # -----BEGIN LIBRARY FEATURES-----
  120. [features]
  121. async-daemonize = ["system"]
  122. async-serial = ["darkfi-serial/async"]
  123. async-sdk = [
  124. "darkfi-sdk/async",
  125. "async-serial",
  126. ]
  127. blockchain = [
  128. "sled-overlay/serial",
  129. "num-bigint",
  130. "darkfi-serial/num-bigint",
  131. "tx",
  132. "util",
  133. ]
  134. validator = [
  135. "crypto_api_chachapoly",
  136. "lazy_static",
  137. "randomx",
  138. "smol",
  139. "wasm-runtime",
  140. ]
  141. geode = [
  142. "blake3",
  143. "bs58",
  144. "futures",
  145. "smol",
  146. ]
  147. event-graph = [
  148. "blake3",
  149. "num-bigint",
  150. "sled-overlay",
  151. "smol",
  152. "tinyjson",
  153. "bs58",
  154. "darkfi-serial",
  155. "darkfi-serial/collections",
  156. "darkfi-serial/hash",
  157. "rpc",
  158. ]
  159. p2p-nym = []
  160. p2p-tor = [
  161. "arti-client",
  162. "tor-hsservice",
  163. "tor-hscrypto",
  164. "tor-error",
  165. "tor-rtcompat",
  166. "tor-proto",
  167. "tor-cell",
  168. ]
  169. net-defaults = [
  170. "async-trait",
  171. "ed25519-compact",
  172. "futures",
  173. "futures-rustls",
  174. "rcgen",
  175. "regex",
  176. "rustls-pemfile",
  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. ]
  192. p2p-unix = []
  193. p2p-socks5 = []
  194. p2p-i2p = [
  195. "p2p-socks5"
  196. ]
  197. net = ["net-defaults"]
  198. rpc = [
  199. "async-trait",
  200. "httparse",
  201. "net",
  202. ]
  203. system = [
  204. "pin-project-lite",
  205. "rand",
  206. "smol",
  207. ]
  208. tx = [
  209. "blake3",
  210. "rand",
  211. "async-sdk",
  212. "async-serial",
  213. "zk",
  214. ]
  215. util = [
  216. "simplelog",
  217. "tinyjson",
  218. "darkfi-serial",
  219. ]
  220. wasm-runtime = [
  221. "wasmer",
  222. "wasmer-compiler-singlepass",
  223. "wasmer-middlewares",
  224. "darkfi-sdk/wasm",
  225. "blockchain",
  226. ]
  227. zk = [
  228. "halo2_proofs",
  229. "halo2_gadgets",
  230. "rand",
  231. "async-sdk",
  232. "zkas",
  233. ]
  234. zkas = [
  235. "darkfi-serial",
  236. ]
  237. # Could not get this to work. Complains manifest-key is ignored.
  238. #[target.'cfg(target_family = "unix")'.features]
  239. #net = ["net-defaults", "p2p-unix"]
  240. #
  241. #[target.'cfg(target_family = "windows")'.features]
  242. #net = ["net-defaults"]
  243. # -----END LIBRARY FEATURES-----
  244. [patch.crates-io]
  245. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  246. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  247. # Temp smol-2.0 fix
  248. async-lock = {git="https://github.com/smol-rs/async-lock", rev="542831132f2c707aae1c380edd43452053433814"}
  249. # Forked "url" crate with added P2P schemas
  250. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  251. [[bench]]
  252. name = "zk_arith"
  253. harness = false
  254. path = "bench/zk_arith.rs"
  255. [[bench]]
  256. name = "zk_from_json"
  257. harness = false
  258. path = "bench/zk_from_json.rs"
  259. [[bench]]
  260. name = "sled"
  261. harness = false
  262. path = "bench/sled.rs"
  263. # Crossbeam SkipMap vs Mutex protected HashMap.
  264. # Uncomment to enable, and add the following to dev-dependencies:
  265. # crossbeam-skiplist = "0.1.3"
  266. # rand = "0.8.5"
  267. #[[bench]]
  268. #name = "crossbeam"
  269. #harness = false
  270. #path = "bench/crossbeam.rs"
  271. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  272. [workspace.lints.clippy]
  273. #arithmetic_side_effects = "warn"
  274. #eq_op = "warn"
  275. #float_cmp = "warn"
  276. # integer_division = "warn"
  277. #large_futures = "warn"
  278. #large_stack_arrays = "warn"
  279. #large_stack_frames = "warn"
  280. #lossy_float_literal = "warn"
  281. #manual_slice_size_calculation = "warn"
  282. #modulo_one = "warn"
  283. #out_of_bounds_indexing = "warn"
  284. #overflow_check_conditional = "warn"
  285. #recursive_format_impl = "warn"
  286. #unchecked_duration_subtraction = "warn"