Cargo.toml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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.174"
  48. thiserror = "2.0.12"
  49. tracing = "0.1.41"
  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.6.0", features = ["all"], optional = true}
  60. arti-client = {version = "0.32.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "onion-service-client", "onion-service-service"], optional = true}
  61. tor-error = {version = "0.32.0", optional = true}
  62. tor-rtcompat = {version = "0.32.0", features = ["async-std", "rustls"], optional = true}
  63. tor-hscrypto = {version = "0.32.0", optional = true}
  64. tor-hsservice = {version = "0.32.0", optional = true}
  65. tor-proto = {version = "0.32.0", optional = true}
  66. tor-cell = {version = "0.32.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. hex = {version = "0.4.3", 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.9.5", 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.5.1", optional = true}
  86. darkfi-derive = {version = "0.5.1", 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. regex = {version = "1.11.1", optional = true}
  94. tracing-subscriber = { version = "0.3.19", default-features = false, features = ["fmt"], optional = true }
  95. tracing-appender = {version = "0.2.3", optional = true }
  96. nu-ansi-term = {version = "0.46.0", optional = true}
  97. # Crypto
  98. rand = {version = "0.8.5", optional = true}
  99. blake3 = {version = "1.8.2", features = ["rayon"], optional = true}
  100. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  101. halo2_proofs = {version = "0.3.1", features = ["circuit-params"], optional = true}
  102. halo2_gadgets = {version = "0.3.1", features = ["circuit-params"], optional = true}
  103. # Smart contract runtime
  104. darkfi-sdk = {path = "src/sdk", optional = true}
  105. wasmer = {version = "6.1.0-rc.2", features = ["singlepass"], optional = true}
  106. wasmer-compiler-singlepass = {version = "6.1.0-rc.2", optional = true}
  107. wasmer-middlewares = {version = "6.1.0-rc.2", optional = true}
  108. # Blockchain store
  109. sled-overlay = {version = "0.1.10", optional = true}
  110. # Miner
  111. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", optional = true, rev = "91cd62809e006f1dcee31ab62160ca5dc71f4c2d"}
  112. monero = {version = "0.21.0", optional = true}
  113. tiny-keccak = { version = "2.0.2", features = ["keccak"], optional = true }
  114. [dev-dependencies]
  115. clap = {version = "4.4.11", features = ["derive"]}
  116. halo2_proofs = {version = "0.3.1", features = ["dev-graph", "sanity-checks"]}
  117. halo2_gadgets = "0.3.1"
  118. plotters = "0.3.7"
  119. easy-parallel = "3.3.1"
  120. prettytable-rs = "0.10.0"
  121. # Used for benchmarks
  122. criterion = { version = "0.7.0", features = ["html_reports"] }
  123. # -----BEGIN LIBRARY FEATURES-----
  124. [features]
  125. async-daemonize = ["system"]
  126. async-serial = ["darkfi-serial/async"]
  127. async-sdk = [
  128. "darkfi-sdk/async",
  129. "async-serial",
  130. ]
  131. blockchain = [
  132. "sled-overlay/serial",
  133. "monero",
  134. "num-bigint",
  135. "tiny-keccak",
  136. "darkfi-serial/num-bigint",
  137. "tx",
  138. "util",
  139. ]
  140. validator = [
  141. "crypto_api_chachapoly",
  142. "hex",
  143. "lazy_static",
  144. "monero",
  145. "randomx",
  146. "smol",
  147. "wasm-runtime",
  148. ]
  149. geode = [
  150. "blake3",
  151. "bs58",
  152. "futures",
  153. "smol",
  154. ]
  155. event-graph = [
  156. "blake3",
  157. "num-bigint",
  158. "sled-overlay",
  159. "smol",
  160. "tinyjson",
  161. "bs58",
  162. "darkfi-serial",
  163. "darkfi-serial/collections",
  164. "darkfi-serial/hash",
  165. "rpc",
  166. ]
  167. p2p-nym = []
  168. p2p-tor = [
  169. "arti-client",
  170. "tor-hsservice",
  171. "tor-hscrypto",
  172. "tor-error",
  173. "tor-rtcompat",
  174. "tor-proto",
  175. "tor-cell",
  176. ]
  177. net-defaults = [
  178. "async-trait",
  179. "ed25519-compact",
  180. "futures",
  181. "futures-rustls",
  182. "rcgen",
  183. "regex",
  184. "rustls-pemfile",
  185. "semver",
  186. "serde",
  187. "socket2",
  188. "structopt",
  189. "structopt-toml",
  190. "url",
  191. "x509-parser",
  192. "darkfi-serial/url",
  193. "async-serial",
  194. "system",
  195. "util",
  196. "p2p-tor",
  197. #"p2p-nym",
  198. "p2p-i2p",
  199. ]
  200. p2p-unix = []
  201. p2p-socks5 = []
  202. p2p-i2p = [
  203. "p2p-socks5"
  204. ]
  205. net = ["net-defaults"]
  206. rpc = [
  207. "async-trait",
  208. "httparse",
  209. "net",
  210. ]
  211. system = [
  212. "pin-project-lite",
  213. "rand",
  214. "smol",
  215. ]
  216. tx = [
  217. "blake3",
  218. "rand",
  219. "async-sdk",
  220. "async-serial",
  221. "zk",
  222. ]
  223. util = [
  224. "tinyjson",
  225. "tracing-subscriber",
  226. "tracing-appender",
  227. "nu-ansi-term",
  228. "smol",
  229. "darkfi-serial",
  230. ]
  231. wasm-runtime = [
  232. "wasmer",
  233. "wasmer-compiler-singlepass",
  234. "wasmer-middlewares",
  235. "darkfi-sdk/wasm",
  236. "blockchain",
  237. ]
  238. zk = [
  239. "halo2_proofs",
  240. "halo2_gadgets",
  241. "rand",
  242. "async-sdk",
  243. "zkas",
  244. ]
  245. zkas = [
  246. "darkfi-serial",
  247. ]
  248. dht = [
  249. "async-sdk",
  250. "blake3",
  251. "bs58",
  252. "futures",
  253. "num-bigint",
  254. "serde",
  255. "structopt",
  256. "structopt-toml",
  257. "smol",
  258. "darkfi-serial",
  259. "net",
  260. ]
  261. # Could not get this to work. Complains manifest-key is ignored.
  262. #[target.'cfg(target_family = "unix")'.features]
  263. #net = ["net-defaults", "p2p-unix"]
  264. #
  265. #[target.'cfg(target_family = "windows")'.features]
  266. #net = ["net-defaults"]
  267. # -----END LIBRARY FEATURES-----
  268. [patch.crates-io]
  269. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v031"}
  270. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v031"}
  271. # Forked "url" crate with added P2P schemas
  272. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  273. [[bench]]
  274. name = "zk_arith"
  275. harness = false
  276. path = "bench/zk_arith.rs"
  277. [[bench]]
  278. name = "zk_from_json"
  279. harness = false
  280. path = "bench/zk_from_json.rs"
  281. [[bench]]
  282. name = "sled"
  283. harness = false
  284. path = "bench/sled.rs"
  285. # Crossbeam SkipMap vs Mutex protected HashMap.
  286. # Uncomment to enable, and add the following to dev-dependencies:
  287. # crossbeam-skiplist = "0.1.3"
  288. # rand = "0.8.5"
  289. #[[bench]]
  290. #name = "crossbeam"
  291. #harness = false
  292. #path = "bench/crossbeam.rs"
  293. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  294. [workspace.lints.clippy]
  295. #arithmetic_side_effects = "warn"
  296. #eq_op = "warn"
  297. #float_cmp = "warn"
  298. # integer_division = "warn"
  299. #large_futures = "warn"
  300. #large_stack_arrays = "warn"
  301. #large_stack_frames = "warn"
  302. #lossy_float_literal = "warn"
  303. #manual_slice_size_calculation = "warn"
  304. #modulo_one = "warn"
  305. #out_of_bounds_indexing = "warn"
  306. #overflow_check_conditional = "warn"
  307. #recursive_format_impl = "warn"
  308. #unchecked_duration_subtraction = "warn"