Cargo.toml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. "src/contract/money",
  43. "example/dchat",
  44. "example/dao",
  45. ]
  46. [dependencies]
  47. # Hard dependencies
  48. libc = "0.2.137"
  49. log = "0.4.17"
  50. thiserror = "1.0.37"
  51. # async-runtime
  52. async-std = {version = "1.12.0", features = ["attributes"], optional = true}
  53. async-trait = {version = "0.1.58", optional = true}
  54. futures = {version = "0.3.25", optional = true}
  55. smol = {version = "1.2.5", optional = true}
  56. # Networking
  57. futures-rustls = {version = "0.22.2", features = ["dangerous_configuration"], optional = true}
  58. iprange = {version = "0.6.7", optional = true}
  59. ipnet = {version = "2.5.1", optional = true}
  60. socket2 = {version = "0.4.7", optional = true}
  61. # TLS cert utilities
  62. ed25519-compact = {version = "1.0.16", features = ["pem"], optional = true}
  63. rcgen = {version = "0.10.0", features = ["pem"], optional = true}
  64. rustls-pemfile = {version = "1.0.1", optional = true}
  65. # Encoding
  66. bs58 = {version = "0.4.0", optional = true}
  67. hex = {version = "0.4.3", optional = true}
  68. serde_json = {version = "1.0.87", optional = true}
  69. serde = {version = "1.0.147", features = ["derive"], optional = true}
  70. structopt = {version= "0.3.26", optional = true}
  71. structopt-toml = {version= "0.5.1", optional = true}
  72. toml = {version = "0.5.9", optional = true}
  73. # Utilities
  74. # TODO: check chrono usage and impl our own
  75. chrono = {version = "0.4.22", optional = true}
  76. darkfi-serial = {path = "src/serial", optional = true}
  77. darkfi-derive = {path = "src/serial/derive", optional = true}
  78. darkfi-derive-internal = {path = "src/serial/derive-internal", optional = true}
  79. fxhash = {version = "0.2.1", optional = true}
  80. indexmap = {version = "1.9.1", optional = true}
  81. itertools = {version = "0.10.5", optional = true}
  82. lazy-init = {version = "0.5.1", optional = true}
  83. lazy_static = {version = "1.4.0", optional = true}
  84. subtle = {version = "2.4.1", optional = true}
  85. # TODO: Test without serde
  86. url = {version = "2.3.1", features = ["serde"], optional = true}
  87. # Misc
  88. # TODO: Implement something simple and kill these deps
  89. indicatif = {version = "0.17.1", optional = true}
  90. simplelog = {version = "0.12.0", optional = true}
  91. termion = {version = "1.5.6", optional = true}
  92. # Websockets
  93. async-tungstenite = {version = "0.18.0", optional = true}
  94. tungstenite = {version = "0.17.3", optional = true}
  95. # socks5
  96. fast-socks5 = {version = "0.4.3", optional = true}
  97. # Crypto
  98. rand = {version = "0.8.5", optional = true}
  99. blake2b_simd = {version = "1.0.0", optional = true}
  100. blake3 = {version = "1.3.1", optional = true}
  101. chacha20poly1305 = {version = "0.10.1", optional = true}
  102. crypto_api_chachapoly = {version = "0.5.0", optional = true}
  103. halo2_proofs = {version = "0.2.0", optional = true}
  104. halo2_gadgets = {version = "0.2.0", optional = true}
  105. incrementalmerkletree = {version = "0.3.0", optional = true}
  106. num-bigint = {version = "0.4.3", optional = true}
  107. num-traits = {version = "0.2.15", optional = true}
  108. pasta_curves = {version = "0.4.1", optional = true}
  109. sha2 = {version = "0.10.6", optional = true}
  110. # Smart contract runtime
  111. darkfi-sdk = {path = "src/sdk", optional = true}
  112. wasmer = {version = "3.0.0-rc.2", optional = true}
  113. wasmer-compiler-singlepass = {version = "3.0.0-rc.2", optional = true}
  114. wasmer-middlewares = {version = "3.0.0-rc.2", optional = true}
  115. # Wallet management
  116. libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true }
  117. sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
  118. # Blockchain store
  119. sled = {version = "0.34.7", optional = true}
  120. # big float
  121. dashu = { version = "0.2.0", git = "https://github.com/ertosns/dashu", optional=true }
  122. [dev-dependencies]
  123. clap = {version = "3.2.20", features = ["derive"]}
  124. halo2_proofs = {version = "0.2.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  125. halo2_gadgets = {version = "0.2.0", features = ["dev-graph", "test-dependencies"]}
  126. plotters = "0.3.4"
  127. env_logger = "0.9.3"
  128. easy-parallel = "3.2.0"
  129. # -----BEGIN LIBRARY FEATURES-----
  130. [features]
  131. async-runtime = [
  132. "async-std",
  133. "async-trait",
  134. "futures",
  135. "smol",
  136. ]
  137. blockchain = [
  138. "blake3",
  139. "chrono",
  140. "dashu",
  141. "halo2_gadgets",
  142. "halo2_proofs",
  143. "incrementalmerkletree",
  144. "lazy-init",
  145. "lazy_static",
  146. "pasta_curves",
  147. "rand",
  148. "sled",
  149. "url",
  150. "crypto_api_chachapoly",
  151. "async-runtime",
  152. "crypto",
  153. "darkfi-sdk",
  154. "darkfi-serial",
  155. "net",
  156. "tx",
  157. "util",
  158. "wasm-runtime",
  159. ]
  160. crypto = [
  161. "blake2b_simd",
  162. "blake3",
  163. "bs58",
  164. "chacha20poly1305",
  165. "fxhash",
  166. "halo2_gadgets",
  167. "halo2_proofs",
  168. "hex",
  169. "incrementalmerkletree",
  170. "lazy_static",
  171. "num-bigint",
  172. "num-traits",
  173. "pasta_curves",
  174. "rand",
  175. "serde",
  176. "serde_json",
  177. "sha2",
  178. "subtle",
  179. "darkfi-sdk",
  180. "darkfi-serial",
  181. "darkfi-serial/crypto",
  182. "util",
  183. "zkas",
  184. ]
  185. dht = [
  186. "blake3",
  187. "chrono",
  188. "rand",
  189. "async-runtime",
  190. "darkfi-serial",
  191. "darkfi-serial/collections",
  192. "darkfi-serial/hash",
  193. "net",
  194. ]
  195. net = [
  196. "fxhash",
  197. "ed25519-compact",
  198. "fast-socks5",
  199. "futures-rustls",
  200. "hex",
  201. "iprange",
  202. "ipnet",
  203. "structopt",
  204. "structopt-toml",
  205. "rand",
  206. "rcgen",
  207. "rustls-pemfile",
  208. "serde",
  209. "serde_json",
  210. "socket2",
  211. "url",
  212. "async-runtime",
  213. "darkfi-serial",
  214. "darkfi-serial/async",
  215. "darkfi-serial/url",
  216. "system",
  217. "util",
  218. ]
  219. raft = [
  220. "chrono",
  221. "fxhash",
  222. "rand",
  223. "sled",
  224. "async-runtime",
  225. "darkfi-serial",
  226. "net",
  227. "util",
  228. ]
  229. rpc = [
  230. "hex",
  231. "rand",
  232. "serde",
  233. "serde_json",
  234. "url",
  235. "async-runtime",
  236. "darkfi-serial",
  237. "net",
  238. ]
  239. system = [
  240. "fxhash",
  241. "rand",
  242. "async-runtime",
  243. ]
  244. tx = [
  245. "incrementalmerkletree",
  246. "rand",
  247. "darkfi-serial",
  248. "crypto",
  249. ]
  250. util = [
  251. "chrono",
  252. "indicatif",
  253. "rand",
  254. "simplelog",
  255. "serde",
  256. "serde_json",
  257. "termion",
  258. "toml",
  259. "url",
  260. "darkfi-serial",
  261. ]
  262. wallet = [
  263. "async-std",
  264. "bs58",
  265. "rand",
  266. "sqlx",
  267. "incrementalmerkletree",
  268. "libsqlite3-sys",
  269. "crypto",
  270. "darkfi-serial",
  271. "util",
  272. ]
  273. wasm-runtime = [
  274. "wasmer",
  275. "wasmer-compiler-singlepass",
  276. "wasmer-middlewares",
  277. "darkfi-sdk",
  278. ]
  279. websockets = [
  280. "async-tungstenite",
  281. "tungstenite",
  282. ]
  283. zkas = [
  284. "termion",
  285. "indexmap",
  286. "itertools",
  287. "darkfi-serial",
  288. ]
  289. # -----END LIBRARY FEATURES-----
  290. [[example]]
  291. name = "net"
  292. path = "example/net.rs"
  293. required-features = ["async-runtime", "net"]
  294. [[example]]
  295. name = "tx"
  296. path = "example/tx.rs"
  297. [[example]]
  298. name = "zk"
  299. path = "example/zk.rs"
  300. required-features = ["crypto"]
  301. [[example]]
  302. name = "dao"
  303. path = "example/dao/src/main.rs"
  304. required-features = ["crypto", "rpc"]
  305. [[example]]
  306. name = "crypsinous"
  307. path = "example/crypsinous.rs"
  308. [[example]]
  309. name = "lessthan"
  310. path = "example/less_than.rs"