Cargo.toml 8.5 KB

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