Cargo.toml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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.2.0", optional = true}
  68. rcgen = {version = "0.14.6", optional = true, features = ["pem"]}
  69. x509-parser = {version = "0.17.0", features = ["validate", "verify"], optional = true}
  70. # Encoding
  71. bs58 = {version = "0.5.1", optional = true}
  72. hex = {version = "0.4.3", optional = true}
  73. serde = {version = "1.0.228", features = ["derive"], optional = true}
  74. tinyjson = {version = "2.5.1", optional = true}
  75. httparse = {version = "1.10.1", optional = true}
  76. primitive-types = {version = "0.14.0", optional = true}
  77. semver = {version = "1.0.27", optional = true}
  78. structopt = {version= "0.3.26", optional = true}
  79. structopt-toml = {version= "0.5.1", optional = true}
  80. toml = {version = "0.9.8", 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.1", optional = true}
  85. darkfi-derive = {version = "0.5.1", optional = true}
  86. # TODO: check chrono usage and impl our own
  87. chrono = {version = "0.4.42", 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.7", features = ["serde"], optional = true}
  91. # Misc
  92. regex = {version = "1.12.2", optional = true}
  93. tracing-subscriber = { version = "0.3.22", default-features = false, features = ["fmt"], optional = true }
  94. tracing-appender = {version = "0.2.4", optional = true }
  95. nu-ansi-term = {version = "0.50.3", optional = true}
  96. # Crypto
  97. rand = {version = "0.8.5", optional = true}
  98. blake3 = {version = "1.8.2", features = ["rayon"], optional = true}
  99. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  100. halo2_proofs = {version = "0.3.2", features = ["circuit-params"], optional = true}
  101. halo2_gadgets = {version = "0.4.0", features = ["circuit-params"], optional = true}
  102. sha2 = {version = "0.10.9", optional = true}
  103. # Smart contract runtime
  104. darkfi-sdk = {path = "src/sdk", optional = true}
  105. wasmer = {version = "6.1.0", features = ["singlepass"], optional = true}
  106. wasmer-compiler-singlepass = {version = "6.1.0", optional = true}
  107. wasmer-middlewares = {version = "6.1.0", optional = true}
  108. # Blockchain store
  109. sled-overlay = {version = "0.1.14", optional = true}
  110. # Miner
  111. randomx = {git = "https://codeberg.org/darkrenaissance/RandomX", optional = true}
  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.2", features = ["circuit-params", "dev-graph", "sanity-checks"]}
  117. halo2_gadgets = {version = "0.4.0", features = ["circuit-params", "test-dependencies"]}
  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.8.1", 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. "primitive-types",
  136. "sha2",
  137. "tiny-keccak",
  138. "darkfi-serial/num-bigint",
  139. "tx",
  140. "util",
  141. ]
  142. validator = [
  143. "crypto_api_chachapoly",
  144. "hex",
  145. "lazy_static",
  146. "monero",
  147. "randomx",
  148. "smol",
  149. "blockchain",
  150. "system",
  151. "wasm-runtime",
  152. ]
  153. geode = [
  154. "blake3",
  155. "bs58",
  156. "futures",
  157. "smol",
  158. ]
  159. event-graph = [
  160. "blake3",
  161. "num-bigint",
  162. "sled-overlay",
  163. "smol",
  164. "tinyjson",
  165. "bs58",
  166. "darkfi-serial",
  167. "darkfi-serial/collections",
  168. "darkfi-serial/hash",
  169. "rpc",
  170. ]
  171. p2p-nym = []
  172. p2p-tor = [
  173. "arti-client",
  174. "tor-hsservice",
  175. "tor-hscrypto",
  176. "tor-error",
  177. "tor-rtcompat",
  178. "tor-proto",
  179. "tor-cell",
  180. ]
  181. net-defaults = [
  182. "async-trait",
  183. "ed25519-compact",
  184. "futures",
  185. "futures-rustls",
  186. "rcgen",
  187. "regex",
  188. "semver",
  189. "serde",
  190. "socket2",
  191. "structopt",
  192. "structopt-toml",
  193. "url",
  194. "x509-parser",
  195. "darkfi-serial/url",
  196. "async-serial",
  197. "system",
  198. "util",
  199. "p2p-tor",
  200. #"p2p-nym",
  201. "p2p-i2p",
  202. ]
  203. p2p-unix = []
  204. p2p-socks5 = []
  205. p2p-i2p = [
  206. "p2p-socks5"
  207. ]
  208. net = ["net-defaults"]
  209. rpc = [
  210. "async-trait",
  211. "httparse",
  212. "net",
  213. ]
  214. system = [
  215. "futures",
  216. "pin-project-lite",
  217. "rand",
  218. "smol",
  219. ]
  220. tx = [
  221. "blake3",
  222. "rand",
  223. "async-sdk",
  224. "async-serial",
  225. "zk",
  226. ]
  227. util = [
  228. "tinyjson",
  229. "tracing-subscriber",
  230. "tracing-appender",
  231. "nu-ansi-term",
  232. "smol",
  233. "darkfi-serial",
  234. ]
  235. wasm-runtime = [
  236. "wasmer",
  237. "wasmer-compiler-singlepass",
  238. "wasmer-middlewares",
  239. "darkfi-sdk/wasm",
  240. "blockchain",
  241. ]
  242. zk = [
  243. "halo2_proofs",
  244. "halo2_gadgets",
  245. "rand",
  246. "darkfi-sdk",
  247. "zkas",
  248. ]
  249. zkas = [
  250. "darkfi-serial",
  251. ]
  252. dht = [
  253. "async-sdk",
  254. "blake3",
  255. "bs58",
  256. "futures",
  257. "num-bigint",
  258. "serde",
  259. "structopt",
  260. "structopt-toml",
  261. "smol",
  262. "darkfi-serial",
  263. "net",
  264. ]
  265. # Could not get this to work. Complains manifest-key is ignored.
  266. #[target.'cfg(target_family = "unix")'.features]
  267. #net = ["net-defaults", "p2p-unix"]
  268. #
  269. #[target.'cfg(target_family = "windows")'.features]
  270. #net = ["net-defaults"]
  271. # -----END LIBRARY FEATURES-----
  272. [patch.crates-io]
  273. halo2_proofs = {git="https://github.com/parazyd/halo2", branch="v032"}
  274. halo2_gadgets = {git="https://github.com/parazyd/halo2", branch="v032"}
  275. # Forked "url" crate with added P2P schemas
  276. url = {git="https://github.com/darkrenaissance/rust-url", branch="v257"}
  277. [[bench]]
  278. name = "zk_arith"
  279. harness = false
  280. path = "bench/zk_arith.rs"
  281. [[bench]]
  282. name = "zk_from_json"
  283. harness = false
  284. path = "bench/zk_from_json.rs"
  285. [[bench]]
  286. name = "sled"
  287. harness = false
  288. path = "bench/sled.rs"
  289. # Crossbeam SkipMap vs Mutex protected HashMap.
  290. # Uncomment to enable, and add the following to dev-dependencies:
  291. # crossbeam-skiplist = "0.1.3"
  292. # rand = "0.8.5"
  293. #[[bench]]
  294. #name = "crossbeam"
  295. #harness = false
  296. #path = "bench/crossbeam.rs"
  297. # Top-level lints. Enabled optionally on a crate-level in their respective Cargo.toml files.
  298. [workspace.lints.clippy]
  299. #arithmetic_side_effects = "warn"
  300. #eq_op = "warn"
  301. #float_cmp = "warn"
  302. # integer_division = "warn"
  303. #large_futures = "warn"
  304. #large_stack_arrays = "warn"
  305. #large_stack_frames = "warn"
  306. #lossy_float_literal = "warn"
  307. #manual_slice_size_calculation = "warn"
  308. #modulo_one = "warn"
  309. #out_of_bounds_indexing = "warn"
  310. #overflow_check_conditional = "warn"
  311. #recursive_format_impl = "warn"
  312. #unchecked_duration_subtraction = "warn"