Cargo.toml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. [package]
  2. name = "darkfi"
  3. version = "0.3.0"
  4. homepage = "https://dark.fi"
  5. description = "Anonymous. Uncensored. Sovereign."
  6. authors = ["Dyne.org foundation <foundation@dyne.org>"]
  7. repository = "https://github.com/darkrenaissance/darkfi"
  8. license = "AGPL-3.0-only"
  9. edition = "2021"
  10. [lib]
  11. name = "darkfi"
  12. doctest = false
  13. #[profile.release]
  14. #debug = true
  15. #lto = "fat"
  16. #codegen-units = 1
  17. [workspace]
  18. members = [
  19. "bin/zkas",
  20. #"bin/cashierd",
  21. "bin/darkfid",
  22. "bin/darkotc",
  23. "bin/drk",
  24. "bin/faucetd",
  25. "bin/fud/fu",
  26. "bin/fud/fud",
  27. "bin/ircd",
  28. "bin/ircd2",
  29. "bin/dnetview",
  30. "bin/dao/daod",
  31. "bin/dao/dao-cli",
  32. "bin/tau/taud",
  33. "bin/tau/tau-cli",
  34. "bin/darkwiki/darkwikid",
  35. "bin/darkwiki/darkwiki-cli",
  36. "bin/vanityaddr",
  37. "bin/lilith",
  38. "src/sdk",
  39. "src/serial",
  40. "src/serial/derive",
  41. "src/serial/derive-internal",
  42. "example/dchat",
  43. "example/dao",
  44. ]
  45. [dependencies]
  46. # Hard dependencies
  47. libc = "0.2.134"
  48. log = "0.4.17"
  49. thiserror = "1.0.37"
  50. # async-runtime
  51. async-std = {version = "1.12.0", features = ["attributes"], optional = true}
  52. async-trait = {version = "0.1.57", optional = true}
  53. futures = {version = "0.3.24", optional = true}
  54. smol = {version = "1.2.5", optional = true}
  55. # Networking
  56. futures-rustls = {version = "0.22.2", features = ["dangerous_configuration"], optional = true}
  57. iprange = {version = "0.6.7", optional = true}
  58. ipnet = {version = "2.5.0", optional = true}
  59. socket2 = {version = "0.4.7", optional = true}
  60. # TLS cert utilities
  61. ed25519-compact = {version = "1.0.16", features = ["pem"], optional = true}
  62. rcgen = {version = "0.10.0", features = ["pem"], optional = true}
  63. rustls-pemfile = {version = "1.0.1", optional = true}
  64. # Encoding
  65. bs58 = {version = "0.4.0", optional = true}
  66. hex = {version = "0.4.3", optional = true}
  67. serde_json = {version = "1.0.85", optional = true}
  68. serde = {version = "1.0.145", features = ["derive"], optional = true}
  69. structopt = {version= "0.3.26", optional = true}
  70. structopt-toml = {version= "0.5.1", optional = true}
  71. toml = {version = "0.5.9", optional = true}
  72. # Utilities
  73. # TODO: check chrono usage and impl our own
  74. chrono = {version = "0.4.22", optional = true}
  75. darkfi-serial = {path = "src/serial", optional = true}
  76. darkfi-derive = {path = "src/serial/derive", optional = true}
  77. darkfi-derive-internal = {path = "src/serial/derive-internal", optional = true}
  78. fxhash = {version = "0.2.1", optional = true}
  79. indexmap = {version = "1.9.1", optional = true}
  80. itertools = {version = "0.10.5", optional = true}
  81. lazy-init = {version = "0.5.1", optional = true}
  82. lazy_static = {version = "1.4.0", optional = true}
  83. subtle = {version = "2.4.1", optional = true}
  84. # TODO: Test without serde
  85. url = {version = "2.3.1", features = ["serde"], optional = true}
  86. # Misc
  87. # TODO: Implement something simple and kill these deps
  88. indicatif = {version = "0.17.1", optional = true}
  89. simplelog = {version = "0.12.0", optional = true}
  90. termion = {version = "1.5.6", optional = true}
  91. # Websockets
  92. async-tungstenite = {version = "0.17.2", optional = true}
  93. tungstenite = {version = "0.17.3", optional = true}
  94. # socks5
  95. fast-socks5 = {version = "0.4.3", optional = true}
  96. # Crypto
  97. rand = {version = "0.8.5", optional = true}
  98. blake2b_simd = {version = "1.0.0", optional = true}
  99. blake3 = {version = "1.3.1", optional = true}
  100. chacha20poly1305 = {version = "0.10.1", optional = true}
  101. halo2_proofs = {version = "0.2.0", optional = true}
  102. halo2_gadgets = {version = "0.2.0", optional = true}
  103. incrementalmerkletree = {version = "0.3.0", optional = true}
  104. num-bigint = {version = "0.4.3", optional = true}
  105. num-traits = {version = "0.2.15", optional = true}
  106. pasta_curves = {version = "0.4.0", optional = true}
  107. sha2 = {version = "0.10.6", optional = true}
  108. # Smart contract runtime
  109. darkfi-sdk = {path = "src/sdk", optional = true}
  110. wasmer = {version = "3.0.0-beta", optional = true}
  111. wasmer-compiler-singlepass = {version = "3.0.0-beta", optional = true}
  112. wasmer-middlewares = {version = "3.0.0-beta", optional = true}
  113. # Wallet management
  114. libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true }
  115. sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
  116. # Blockchain store
  117. sled = {version = "0.34.7", optional = true}
  118. # big float
  119. dashu = { version = "0.2.0", git = "https://github.com/ertosns/dashu", optional=true }
  120. [dev-dependencies]
  121. clap = {version = "3.2.20", features = ["derive"]}
  122. halo2_proofs = {version = "0.2.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  123. halo2_gadgets = {version = "0.2.0", features = ["dev-graph", "test-dependencies"]}
  124. plotters = "0.3.4"
  125. env_logger = "0.9.1"
  126. easy-parallel = "3.2.0"
  127. # -----BEGIN LIBRARY FEATURES-----
  128. [features]
  129. async-runtime = [
  130. "async-std",
  131. "async-trait",
  132. "futures",
  133. "smol",
  134. ]
  135. blockchain = [
  136. "blake3",
  137. "chrono",
  138. "halo2_gadgets",
  139. "halo2_proofs",
  140. "incrementalmerkletree",
  141. "lazy-init",
  142. "lazy_static",
  143. "pasta_curves",
  144. "rand",
  145. "sled",
  146. "url",
  147. "async-runtime",
  148. "crypto",
  149. "darkfi-sdk",
  150. "darkfi-serial",
  151. "net",
  152. "tx",
  153. "node",
  154. "util",
  155. "dep:dashu",
  156. ]
  157. crypto = [
  158. "blake2b_simd",
  159. "blake3",
  160. "bs58",
  161. "chacha20poly1305",
  162. "fxhash",
  163. "halo2_gadgets",
  164. "halo2_proofs",
  165. "hex",
  166. "incrementalmerkletree",
  167. "lazy_static",
  168. "num-bigint",
  169. "num-traits",
  170. "pasta_curves",
  171. "rand",
  172. "serde",
  173. "serde_json",
  174. "sha2",
  175. "subtle",
  176. "darkfi-sdk",
  177. "darkfi-serial",
  178. "darkfi-serial/crypto",
  179. "util",
  180. "zkas",
  181. ]
  182. dht = [
  183. "blake3",
  184. "chrono",
  185. "rand",
  186. "async-runtime",
  187. "darkfi-serial",
  188. "darkfi-serial/collections",
  189. "darkfi-serial/hash",
  190. "net",
  191. ]
  192. net = [
  193. "fxhash",
  194. "ed25519-compact",
  195. "fast-socks5",
  196. "futures-rustls",
  197. "hex",
  198. "iprange",
  199. "ipnet",
  200. "structopt",
  201. "structopt-toml",
  202. "rand",
  203. "rcgen",
  204. "rustls-pemfile",
  205. "serde",
  206. "serde_json",
  207. "socket2",
  208. "url",
  209. "async-runtime",
  210. "darkfi-serial",
  211. "darkfi-serial/async",
  212. "darkfi-serial/url",
  213. "system",
  214. "util",
  215. ]
  216. node = [
  217. "bs58",
  218. "incrementalmerkletree",
  219. "lazy-init",
  220. "async-runtime",
  221. "blockchain",
  222. "crypto",
  223. "darkfi-serial",
  224. "tx",
  225. "wallet",
  226. ]
  227. raft = [
  228. "chrono",
  229. "fxhash",
  230. "rand",
  231. "sled",
  232. "async-runtime",
  233. "darkfi-serial",
  234. "net",
  235. "util",
  236. ]
  237. rpc = [
  238. "hex",
  239. "rand",
  240. "serde",
  241. "serde_json",
  242. "url",
  243. "async-runtime",
  244. "darkfi-serial",
  245. "net",
  246. ]
  247. system = [
  248. "fxhash",
  249. "rand",
  250. "async-runtime",
  251. ]
  252. tx = [
  253. "incrementalmerkletree",
  254. "rand",
  255. "darkfi-serial",
  256. "crypto",
  257. ]
  258. util = [
  259. "chrono",
  260. "indicatif",
  261. "rand",
  262. "simplelog",
  263. "serde",
  264. "serde_json",
  265. "termion",
  266. "toml",
  267. "url",
  268. "darkfi-serial",
  269. ]
  270. wallet = [
  271. "async-std",
  272. "bs58",
  273. "rand",
  274. "sqlx",
  275. "incrementalmerkletree",
  276. "libsqlite3-sys",
  277. "crypto",
  278. "darkfi-serial",
  279. "util",
  280. ]
  281. wasm-runtime = [
  282. "wasmer",
  283. "wasmer-compiler-singlepass",
  284. "wasmer-middlewares",
  285. "darkfi-sdk",
  286. "node",
  287. ]
  288. websockets = [
  289. "async-tungstenite",
  290. "tungstenite",
  291. ]
  292. zkas = [
  293. "termion",
  294. "indexmap",
  295. "itertools",
  296. "darkfi-serial",
  297. ]
  298. # -----END LIBRARY FEATURES-----
  299. [[example]]
  300. name = "net"
  301. path = "example/net.rs"
  302. required-features = ["async-runtime", "net"]
  303. [[example]]
  304. name = "tx"
  305. path = "example/tx.rs"
  306. required-features = ["node"]
  307. [[example]]
  308. name = "zk"
  309. path = "example/zk.rs"
  310. required-features = ["crypto"]
  311. [[example]]
  312. name = "dao"
  313. path = "example/dao/src/main.rs"
  314. required-features = ["crypto", "rpc"]
  315. [[example]]
  316. name = "crypsinous"
  317. path = "example/crypsinous.rs"
  318. required-features = ["node"]
  319. [[example]]
  320. name = "lessthan"
  321. path = "example/less_than.rs"
  322. required-features = ["node"]