Cargo.toml 7.7 KB

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