Cargo.toml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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. halo2_proofs = {version = "0.2.0", optional = true}
  103. halo2_gadgets = {version = "0.2.0", optional = true}
  104. incrementalmerkletree = {version = "0.3.0", optional = true}
  105. num-bigint = {version = "0.4.3", optional = true}
  106. num-traits = {version = "0.2.15", optional = true}
  107. pasta_curves = {version = "0.4.1", optional = true}
  108. sha2 = {version = "0.10.6", optional = true}
  109. # Smart contract runtime
  110. darkfi-sdk = {path = "src/sdk", optional = true}
  111. wasmer = {version = "3.0.0-rc.2", optional = true}
  112. wasmer-compiler-singlepass = {version = "3.0.0-rc.2", optional = true}
  113. wasmer-middlewares = {version = "3.0.0-rc.2", optional = true}
  114. # Wallet management
  115. libsqlite3-sys = {version = "0.24.2", features = ["bundled-sqlcipher"], optional = true }
  116. sqlx = {version = "0.6.2", features = ["runtime-async-std-native-tls", "sqlite"], optional = true}
  117. # Blockchain store
  118. sled = {version = "0.34.7", optional = true}
  119. # big float
  120. dashu = { version = "0.2.0", git = "https://github.com/ertosns/dashu", optional=true }
  121. [dev-dependencies]
  122. clap = {version = "3.2.20", features = ["derive"]}
  123. halo2_proofs = {version = "0.2.0", features = ["dev-graph", "gadget-traces", "sanity-checks"]}
  124. halo2_gadgets = {version = "0.2.0", features = ["dev-graph", "test-dependencies"]}
  125. plotters = "0.3.4"
  126. env_logger = "0.9.3"
  127. easy-parallel = "3.2.0"
  128. # -----BEGIN LIBRARY FEATURES-----
  129. [features]
  130. async-runtime = [
  131. "async-std",
  132. "async-trait",
  133. "futures",
  134. "smol",
  135. ]
  136. blockchain = [
  137. "blake3",
  138. "chrono",
  139. "dashu",
  140. "halo2_gadgets",
  141. "halo2_proofs",
  142. "incrementalmerkletree",
  143. "lazy-init",
  144. "lazy_static",
  145. "pasta_curves",
  146. "rand",
  147. "sled",
  148. "url",
  149. "async-runtime",
  150. "crypto",
  151. "darkfi-sdk",
  152. "darkfi-serial",
  153. "net",
  154. "tx",
  155. "util",
  156. "wasm-runtime",
  157. ]
  158. crypto = [
  159. "blake2b_simd",
  160. "blake3",
  161. "bs58",
  162. "chacha20poly1305",
  163. "fxhash",
  164. "halo2_gadgets",
  165. "halo2_proofs",
  166. "hex",
  167. "incrementalmerkletree",
  168. "lazy_static",
  169. "num-bigint",
  170. "num-traits",
  171. "pasta_curves",
  172. "rand",
  173. "serde",
  174. "serde_json",
  175. "sha2",
  176. "subtle",
  177. "darkfi-sdk",
  178. "darkfi-serial",
  179. "darkfi-serial/crypto",
  180. "util",
  181. "zkas",
  182. ]
  183. dht = [
  184. "blake3",
  185. "chrono",
  186. "rand",
  187. "async-runtime",
  188. "darkfi-serial",
  189. "darkfi-serial/collections",
  190. "darkfi-serial/hash",
  191. "net",
  192. ]
  193. net = [
  194. "fxhash",
  195. "ed25519-compact",
  196. "fast-socks5",
  197. "futures-rustls",
  198. "hex",
  199. "iprange",
  200. "ipnet",
  201. "structopt",
  202. "structopt-toml",
  203. "rand",
  204. "rcgen",
  205. "rustls-pemfile",
  206. "serde",
  207. "serde_json",
  208. "socket2",
  209. "url",
  210. "async-runtime",
  211. "darkfi-serial",
  212. "darkfi-serial/async",
  213. "darkfi-serial/url",
  214. "system",
  215. "util",
  216. ]
  217. raft = [
  218. "chrono",
  219. "fxhash",
  220. "rand",
  221. "sled",
  222. "async-runtime",
  223. "darkfi-serial",
  224. "net",
  225. "util",
  226. ]
  227. rpc = [
  228. "hex",
  229. "rand",
  230. "serde",
  231. "serde_json",
  232. "url",
  233. "async-runtime",
  234. "darkfi-serial",
  235. "net",
  236. ]
  237. system = [
  238. "fxhash",
  239. "rand",
  240. "async-runtime",
  241. ]
  242. tx = [
  243. "incrementalmerkletree",
  244. "rand",
  245. "darkfi-serial",
  246. "crypto",
  247. ]
  248. util = [
  249. "chrono",
  250. "indicatif",
  251. "rand",
  252. "simplelog",
  253. "serde",
  254. "serde_json",
  255. "termion",
  256. "toml",
  257. "url",
  258. "darkfi-serial",
  259. ]
  260. wallet = [
  261. "async-std",
  262. "bs58",
  263. "rand",
  264. "sqlx",
  265. "incrementalmerkletree",
  266. "libsqlite3-sys",
  267. "crypto",
  268. "darkfi-serial",
  269. "util",
  270. ]
  271. wasm-runtime = [
  272. "wasmer",
  273. "wasmer-compiler-singlepass",
  274. "wasmer-middlewares",
  275. "darkfi-sdk",
  276. ]
  277. websockets = [
  278. "async-tungstenite",
  279. "tungstenite",
  280. ]
  281. zkas = [
  282. "termion",
  283. "indexmap",
  284. "itertools",
  285. "darkfi-serial",
  286. ]
  287. # -----END LIBRARY FEATURES-----
  288. [[example]]
  289. name = "net"
  290. path = "example/net.rs"
  291. required-features = ["async-runtime", "net"]
  292. [[example]]
  293. name = "tx"
  294. path = "example/tx.rs"
  295. [[example]]
  296. name = "zk"
  297. path = "example/zk.rs"
  298. required-features = ["crypto"]
  299. [[example]]
  300. name = "dao"
  301. path = "example/dao/src/main.rs"
  302. required-features = ["crypto", "rpc"]
  303. [[example]]
  304. name = "crypsinous"
  305. path = "example/crypsinous.rs"
  306. [[example]]
  307. name = "lessthan"
  308. path = "example/less_than.rs"