Cargo.toml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  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/darkfi-mmproxy",
  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/tau/taud",
  31. #"bin/tau/tau-cli",
  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. # Utils
  45. "script/ping",
  46. ]
  47. [dependencies]
  48. # Hard dependencies
  49. libc = "0.2.155"
  50. log = "0.4.22"
  51. thiserror = "1.0.61"
  52. # async-runtime
  53. async-recursion = {version = "1.1.1", optional = true}
  54. async-trait = {version = "0.1.81", optional = true}
  55. futures = {version = "0.3.30", optional = true}
  56. smol = {version = "2.0.0", optional = true}
  57. pin-project-lite = {version = "0.2.14", optional = true}
  58. # Networking
  59. futures-rustls = {version = "0.26.0", default-features = false, features = ["logging", "tls12", "ring"], optional = true}
  60. # Pluggable Transports
  61. socket2 = {version = "0.5.7", features = ["all"], optional = true}
  62. arti-client = {version = "0.20.0", default-features = false, features = ["async-std", "compression", "error_detail", "rustls", "accel-sha1-asm", "accel-openssl", "onion-service-client", "onion-service-service"], optional = true}
  63. tor-error = {version = "0.20.0", optional = true}
  64. tor-rtcompat = {version = "0.20.0", features = ["async-std", "rustls"], optional = true}
  65. tor-hscrypto = {version = "0.20.0", optional = true}
  66. tor-hsservice = {version = "0.20.0", optional = true}
  67. tor-proto = {version = "0.20.0", optional = true}
  68. tor-cell = {version = "0.20.0", optional = true}
  69. # TLS cert utilities
  70. ed25519-compact = {version = "2.1.1", optional = true}
  71. rcgen = {version = "0.12.1", optional = true}
  72. rustls-pemfile = {version = "2.1.2", optional = true}
  73. x509-parser = {version = "0.16.0", features = ["validate", "verify"], optional = true}
  74. # Encoding
  75. bs58 = {version = "0.5.1", optional = true}
  76. serde = {version = "1.0.204", features = ["derive"], optional = true}
  77. tinyjson = {version = "2.5.1", optional = true}
  78. semver = {version = "1.0.23", optional = true}
  79. structopt = {version= "0.3.26", optional = true}
  80. structopt-toml = {version= "0.5.1", optional = true}
  81. toml = {version = "0.8.14", optional = true}
  82. # Utilities
  83. # TODO: check chrono usage and impl our own
  84. chrono = {version = "0.4.38", optional = true}
  85. darkfi-serial = {path = "src/serial", optional = true}
  86. darkfi-derive = {path = "src/serial/derive", optional = true}
  87. lazy_static = {version = "1.5.0", optional = true}
  88. num-bigint = {version = "0.4.6", optional = true}
  89. url = {version = "2.5.2", features = ["serde"], optional = true}
  90. # Misc
  91. simplelog = {version = "0.12.2", optional = true}
  92. regex = {version = "1.10.5", optional = true}
  93. # Crypto
  94. rand = {version = "0.8.5", optional = true}
  95. blake3 = {version = "1.5.1", features = ["rayon"], optional = true}
  96. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  97. halo2_proofs = {version = "0.3.0", features = ["circuit-params"], optional = true}
  98. halo2_gadgets = {version = "0.3.0", features = ["circuit-params"], optional = true}
  99. # Smart contract runtime
  100. darkfi-sdk = {path = "src/sdk", optional = true}
  101. wasmer = {version = "4.3.4", optional = true}
  102. wasmer-compiler-singlepass = {version = "4.3.4", optional = true}
  103. wasmer-middlewares = {version = "4.3.4", optional = true}
  104. # SQLite stuff
  105. rusqlite = {version = "0.31.0", features = ["sqlcipher"], optional = true}
  106. libsqlite3-sys = {version = "0.28.0", features = ["sqlcipher"], optional = true}
  107. # Blockchain store
  108. sled = {version = "0.34.7", optional = true}
  109. sled-overlay = {version = "0.1.2", optional = true}
  110. # Miner
  111. randomx = {git = "https://github.com/darkrenaissance/RandomX", optional = true}
  112. [dev-dependencies]
  113. clap = {version = "4.4.11", features = ["derive"]}
  114. halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
  115. halo2_gadgets = "0.3.0"
  116. plotters = "0.3.6"
  117. easy-parallel = "3.3.1"
  118. prettytable-rs = "0.10.0"
  119. # Used for benchmarks
  120. criterion = { version = "0.5.1", features = ["html_reports"] }
  121. # -----BEGIN LIBRARY FEATURES-----
  122. [features]
  123. async-daemonize = ["system"]
  124. async-serial = ["darkfi-serial/async"]
  125. async-sdk = [
  126. "darkfi-sdk/async",
  127. "async-serial",
  128. ]
  129. blockchain = [
  130. "blake3",
  131. "sled",
  132. "sled-overlay",
  133. "num-bigint",
  134. "async-sdk",
  135. "async-serial",
  136. "darkfi-serial/num-bigint",
  137. "tx",
  138. "util",
  139. "zk",
  140. "zkas",
  141. ]
  142. validator = [
  143. "async-trait",
  144. "blake3",
  145. "crypto_api_chachapoly",
  146. "halo2_proofs",
  147. "lazy_static",
  148. "num-bigint",
  149. "rand",
  150. "randomx",
  151. "smol",
  152. "sled",
  153. "url",
  154. "async-sdk",
  155. "async-serial",
  156. "blockchain",
  157. "net",
  158. "rpc",
  159. "system",
  160. "tx",
  161. "util",
  162. "wasm-runtime",
  163. "zk",
  164. "zkas",
  165. ]
  166. geode = [
  167. "blake3",
  168. "futures",
  169. "smol",
  170. ]
  171. event-graph = [
  172. "async-trait",
  173. "blake3",
  174. "num-bigint",
  175. "rand",
  176. "sled",
  177. "sled-overlay",
  178. "smol",
  179. "tinyjson",
  180. "bs58",
  181. "darkfi-serial",
  182. "darkfi-serial/collections",
  183. "darkfi-serial/hash",
  184. "net",
  185. "rpc",
  186. "system",
  187. "util",
  188. ]
  189. p2p-unix = []
  190. p2p-nym = []
  191. p2p-tcp = ["socket2"]
  192. p2p-tor = [
  193. "arti-client",
  194. "tor-hsservice",
  195. "tor-hscrypto",
  196. "tor-error",
  197. "tor-rtcompat",
  198. "tor-proto",
  199. "tor-cell",
  200. "libsqlite3-sys",
  201. ]
  202. net = [
  203. "async-trait",
  204. "ed25519-compact",
  205. "futures",
  206. "futures-rustls",
  207. "rand",
  208. "rcgen",
  209. "regex",
  210. "rustls-pemfile",
  211. "semver",
  212. "smol",
  213. "serde",
  214. "structopt",
  215. "structopt-toml",
  216. "url",
  217. "x509-parser",
  218. "darkfi-serial",
  219. "darkfi-serial/url",
  220. "async-serial",
  221. "system",
  222. "util",
  223. "p2p-tcp",
  224. "p2p-tor",
  225. #"p2p-nym",
  226. "p2p-unix",
  227. ]
  228. rpc = [
  229. "async-trait",
  230. "rand",
  231. "smol",
  232. "tinyjson",
  233. "url",
  234. "net",
  235. "system",
  236. "util",
  237. ]
  238. system = [
  239. "pin-project-lite",
  240. "rand",
  241. "smol",
  242. ]
  243. tx = [
  244. "blake3",
  245. "rand",
  246. "async-sdk",
  247. "async-serial",
  248. "zk",
  249. ]
  250. util = [
  251. "simplelog",
  252. "tinyjson",
  253. "darkfi-serial",
  254. ]
  255. wasm-runtime = [
  256. "wasmer",
  257. "wasmer-compiler-singlepass",
  258. "wasmer-middlewares",
  259. "darkfi-sdk",
  260. "darkfi-serial",
  261. "blockchain",
  262. "util",
  263. "zk",
  264. "zkas",
  265. ]
  266. zk = [
  267. "halo2_proofs",
  268. "halo2_gadgets",
  269. "rand",
  270. "async-serial",
  271. "async-sdk",
  272. "zkas",
  273. ]
  274. zkas = [
  275. "darkfi-serial",
  276. ]
  277. # -----END LIBRARY FEATURES-----
  278. [patch.crates-io]
  279. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v4"}
  280. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v4"}
  281. # Temp smol-2.0 fix
  282. async-lock = {git="https://github.com/smol-rs/async-lock", rev="542831132f2c707aae1c380edd43452053433814"}
  283. # Forked "url" crate with added P2P schemas
  284. url = {git="https://github.com/darkrenaissance/rust-url", branch="main"}
  285. [[bench]]
  286. name = "zk_arith"
  287. harness = false
  288. path = "bench/zk_arith.rs"
  289. [[bench]]
  290. name = "zk_from_json"
  291. harness = false
  292. path = "bench/zk_from_json.rs"
  293. [[bench]]
  294. name = "sled"
  295. harness = false
  296. path = "bench/sled.rs"
  297. # Crossbeam SkipMap vs Mutex protected HashMap.
  298. # Uncomment to enable, and add the following to dev-dependencies:
  299. # crossbeam-skiplist = "0.1.3"
  300. # rand = "0.8.5"
  301. #[[bench]]
  302. #name = "crossbeam"
  303. #harness = false
  304. #path = "bench/crossbeam.rs"
  305. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  306. [workspace.lints.clippy]
  307. #arithmetic_side_effects = "warn"
  308. #eq_op = "warn"
  309. #float_cmp = "warn"
  310. # integer_division = "warn"
  311. #large_futures = "warn"
  312. #large_stack_arrays = "warn"
  313. #large_stack_frames = "warn"
  314. #lossy_float_literal = "warn"
  315. #manual_slice_size_calculation = "warn"
  316. #modulo_one = "warn"
  317. #out_of_bounds_indexing = "warn"
  318. #overflow_check_conditional = "warn"
  319. #recursive_format_impl = "warn"
  320. #unchecked_duration_subtraction = "warn"