Cargo.toml 8.5 KB

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