Cargo.toml 7.8 KB

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