Cargo.toml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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/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.172"
  48. log = "0.4.27"
  49. thiserror = "2.0.12"
  50. # async-runtime
  51. async-recursion = {version = "1.1.1", optional = true}
  52. async-trait = {version = "0.1.88", optional = true}
  53. futures = {version = "0.3.31", optional = true}
  54. smol = {version = "2.0.2", optional = true}
  55. pin-project-lite = {version = "0.2.16", 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.9", features = ["all"], optional = true}
  60. arti-client = {version = "0.30.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "onion-service-client", "onion-service-service"], optional = true}
  61. tor-error = {version = "0.30.0", optional = true}
  62. tor-rtcompat = {version = "0.30.0", features = ["async-std", "rustls"], optional = true}
  63. tor-hscrypto = {version = "0.30.0", optional = true}
  64. tor-hsservice = {version = "0.30.0", optional = true}
  65. tor-proto = {version = "0.30.0", optional = true}
  66. tor-cell = {version = "0.30.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.2.0", optional = true}
  71. x509-parser = {version = "0.17.0", features = ["validate", "verify"], optional = true}
  72. # Encoding
  73. bs58 = {version = "0.5.1", optional = true}
  74. serde = {version = "1.0.219", features = ["derive"], optional = true}
  75. tinyjson = {version = "2.5.1", optional = true}
  76. httparse = {version = "1.10.1", optional = true}
  77. semver = {version = "1.0.26", optional = true}
  78. structopt = {version= "0.3.26", optional = true}
  79. structopt-toml = {version= "0.5.1", optional = true}
  80. toml = {version = "0.8.22", optional = true}
  81. # Utilities
  82. #darkfi-serial = {path = "src/serial", optional = true}
  83. #darkfi-derive = {path = "src/serial/derive", optional = true}
  84. darkfi-serial = {version = "0.5.0", optional = true}
  85. darkfi-derive = {version = "0.5.0", optional = true}
  86. # TODO: check chrono usage and impl our own
  87. chrono = {version = "0.4.41", optional = true}
  88. lazy_static = {version = "1.5.0", optional = true}
  89. num-bigint = {version = "0.4.6", optional = true}
  90. url = {version = "2.5.4", features = ["serde"], optional = true}
  91. # Misc
  92. simplelog = {version = "0.12.2", optional = true}
  93. regex = {version = "1.11.1", optional = true}
  94. # Crypto
  95. rand = {version = "0.8.5", optional = true}
  96. blake3 = {version = "1.8.2", features = ["rayon"], optional = true}
  97. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  98. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  99. halo2_gadgets = {version = "0.3.1", features = ["circuit-params"], optional = true}
  100. # Smart contract runtime
  101. darkfi-sdk = {path = "src/sdk", optional = true}
  102. wasmer = {version = "6.0.1", features = ["singlepass"], optional = true}
  103. wasmer-compiler-singlepass = {version = "6.0.1", optional = true}
  104. wasmer-middlewares = {version = "6.0.1", optional = true}
  105. # Blockchain store
  106. sled-overlay = {version = "0.1.9", optional = true}
  107. # Miner
  108. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", optional = true, rev = "91cd62809e006f1dcee31ab62160ca5dc71f4c2d"}
  109. monero = {version = "0.21.0", optional = true}
  110. tiny-keccak = { version = "2.0.2", features = ["keccak"], optional = true }
  111. [dev-dependencies]
  112. clap = {version = "4.4.11", features = ["derive"]}
  113. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  114. halo2_gadgets = "0.3.1"
  115. plotters = "0.3.7"
  116. easy-parallel = "3.3.1"
  117. prettytable-rs = "0.10.0"
  118. # Used for benchmarks
  119. criterion = { version = "0.5.1", features = ["html_reports"] }
  120. # -----BEGIN LIBRARY FEATURES-----
  121. [features]
  122. async-daemonize = ["system"]
  123. async-serial = ["darkfi-serial/async"]
  124. async-sdk = [
  125. "darkfi-sdk/async",
  126. "async-serial",
  127. ]
  128. blockchain = [
  129. "sled-overlay/serial",
  130. "monero",
  131. "num-bigint",
  132. "tiny-keccak",
  133. "darkfi-serial/num-bigint",
  134. "tx",
  135. "util",
  136. ]
  137. validator = [
  138. "crypto_api_chachapoly",
  139. "lazy_static",
  140. "randomx",
  141. "smol",
  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. "rpc",
  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. "regex",
  179. "rustls-pemfile",
  180. "semver",
  181. "serde",
  182. "socket2",
  183. "structopt",
  184. "structopt-toml",
  185. "url",
  186. "x509-parser",
  187. "darkfi-serial/url",
  188. "async-serial",
  189. "system",
  190. "util",
  191. "p2p-tor",
  192. #"p2p-nym",
  193. "p2p-i2p",
  194. ]
  195. p2p-unix = []
  196. p2p-socks5 = []
  197. p2p-i2p = [
  198. "p2p-socks5"
  199. ]
  200. net = ["net-defaults"]
  201. rpc = [
  202. "async-trait",
  203. "httparse",
  204. "net",
  205. ]
  206. system = [
  207. "pin-project-lite",
  208. "rand",
  209. "smol",
  210. ]
  211. tx = [
  212. "blake3",
  213. "rand",
  214. "async-sdk",
  215. "async-serial",
  216. "zk",
  217. ]
  218. util = [
  219. "simplelog",
  220. "tinyjson",
  221. "darkfi-serial",
  222. ]
  223. wasm-runtime = [
  224. "wasmer",
  225. "wasmer-compiler-singlepass",
  226. "wasmer-middlewares",
  227. "darkfi-sdk/wasm",
  228. "blockchain",
  229. ]
  230. zk = [
  231. "halo2_proofs",
  232. "halo2_gadgets",
  233. "rand",
  234. "async-sdk",
  235. "zkas",
  236. ]
  237. zkas = [
  238. "darkfi-serial",
  239. ]
  240. dht = [
  241. "async-sdk",
  242. "blake3",
  243. "bs58",
  244. "futures",
  245. "num-bigint",
  246. "serde",
  247. "structopt",
  248. "structopt-toml",
  249. "smol",
  250. "darkfi-serial",
  251. "net",
  252. ]
  253. # Could not get this to work. Complains manifest-key is ignored.
  254. #[target.'cfg(target_family = "unix")'.features]
  255. #net = ["net-defaults", "p2p-unix"]
  256. #
  257. #[target.'cfg(target_family = "windows")'.features]
  258. #net = ["net-defaults"]
  259. # -----END LIBRARY FEATURES-----
  260. [patch.crates-io]
  261. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  262. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  263. # Temp smol-2.0 fix
  264. async-lock = {git="https://github.com/smol-rs/async-lock", rev="542831132f2c707aae1c380edd43452053433814"}
  265. # Forked "url" crate with added P2P schemas
  266. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  267. [[bench]]
  268. name = "zk_arith"
  269. harness = false
  270. path = "bench/zk_arith.rs"
  271. [[bench]]
  272. name = "zk_from_json"
  273. harness = false
  274. path = "bench/zk_from_json.rs"
  275. [[bench]]
  276. name = "sled"
  277. harness = false
  278. path = "bench/sled.rs"
  279. # Crossbeam SkipMap vs Mutex protected HashMap.
  280. # Uncomment to enable, and add the following to dev-dependencies:
  281. # crossbeam-skiplist = "0.1.3"
  282. # rand = "0.8.5"
  283. #[[bench]]
  284. #name = "crossbeam"
  285. #harness = false
  286. #path = "bench/crossbeam.rs"
  287. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  288. [workspace.lints.clippy]
  289. #arithmetic_side_effects = "warn"
  290. #eq_op = "warn"
  291. #float_cmp = "warn"
  292. # integer_division = "warn"
  293. #large_futures = "warn"
  294. #large_stack_arrays = "warn"
  295. #large_stack_frames = "warn"
  296. #lossy_float_literal = "warn"
  297. #manual_slice_size_calculation = "warn"
  298. #modulo_one = "warn"
  299. #out_of_bounds_indexing = "warn"
  300. #overflow_check_conditional = "warn"
  301. #recursive_format_impl = "warn"
  302. #unchecked_duration_subtraction = "warn"