forked from KomodoPlatform/komodo-defi-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
127 lines (110 loc) · 4.63 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Support for split-debuginfo [should eventually](https://github.com/rust-lang/rust/issues/34651) land,
# hopefully giving us an out-of-the-box way to separate the code from the debugging information.
# We should use the "objcopy --only-keep-debug" and "add-symbol-file" meanwhile
# and separating stack tracing into raw trace and symbolication parts.
# https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-overrides
cargo-features = ["profile-overrides"]
[package]
name = "mm2"
version = "0.1.0"
edition = "2018"
default-run = "mm2"
[features]
native = [
"hyper", "tokio-core", "dirs", "docker_tests",
"common/native", "peers/native", "coins/native", # "portfolio/native"
]
[[bin]]
name = "mm2"
path = "mm2src/mm2_bin.rs"
[lib]
name = "mm2"
path = "mm2src/mm2_lib.rs"
crate-type = ["staticlib"]
test = false
doctest = false
bench = false
[profile.dev]
# Enable light optimizations. We want a debuggable version but not a completely dumb one.
# Can override this with "set CARGO_BUILD_RUSTFLAGS=-C opt-level=0".
opt-level = 1
# Uncomment on Raspberry Pi
# cf. https://github.com/rust-lang/rust/issues/62896
#codegen-units = 1
[profile.test]
# Should probably match "profile.dev", given that we're reusing the libraries.
opt-level = 1
[profile.release]
# Due to the "overrides" only affects our workspace crates, as intended.
debug = true
# For better or worse, might affect the stack traces in our portion of the code.
#opt-level = 1
[profile.release.overrides."*"]
# Turns debugging symbols off for the out-of-workspace dependencies.
debug = false
[dependencies]
bigdecimal = { version = "0.1", features = ["serde"] }
bitcrypto = { git = "https://github.com/artemii235/parity-bitcoin.git" }
bytes = "0.4"
coins = { path = "mm2src/coins" }
common = { path = "mm2src/common" }
crc = "1.8"
crc32fast = { version = "1.2", features = ["std", "nightly"] }
crossbeam = "0.7"
dirs = { version = "1", optional = true }
docker_tests = { path = "mm2src/docker_tests", optional = true }
enum-primitive-derive = "0.1"
fomat-macros = "0.2"
futures01 = { version = "0.1", package = "futures" }
futures-cpupool = "0.1"
# NB: tokio-timer 2+ is targeted at "Tokio runtime" and heavy load (spawns several timer threads there),
# whereas futures-timer works with any reactor and spawns one global timer thread (fits out load better).
futures-timer = "0.1"
futures = { version = ">=0.3.0-alpha.16, <0.4", package = "futures-preview", features = ["compat", "async-await", "nightly"] }
gstuff = { version = "0.6", features = ["nightly"] }
hex = "0.3.2"
http = "0.1"
hyper = { version = "0.12", optional = true }
keys = { git = "https://github.com/artemii235/parity-bitcoin.git" }
lazy_static = "1.3"
libc = "0.2"
num-rational = { version = "0.2", features = ["serde", "bigint", "bigint-std"] }
num-traits = "0.2"
rpc = { git = "https://github.com/artemii235/parity-bitcoin.git" }
peers = { path = "mm2src/peers" }
# AP: portfolio RPCs are not documented and not used as of now
# so the crate is disabled to speed up the entire removal of C code
# portfolio = { path = "mm2src/portfolio" }
primitives = { git = "https://github.com/artemii235/parity-bitcoin.git" }
rand = { version = "0.7", features = ["std", "small_rng"] }
# TODO: Reduce the size of regex by disabling the features we don't use.
# cf. https://github.com/rust-lang/regex/issues/583
regex = "1"
serde = "1.0"
serde_bencode = "0.2"
serde_json = "1.0"
serde_derive = "1.0"
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
serialization_derive = { git = "https://github.com/artemii235/parity-bitcoin.git" }
# Pin `term` to 0.5.1 because `dirs` is not portable, cf.
# https://github.com/Stebalien/term/commit/84cfdb51775b327fedf21784749d862fdffa10b4#diff-80398c5faae3c069e4e6aa2ed11b28c0
term = "=0.5.1"
tokio-core = { version = "0.1", optional = true }
unwrap = "1.2"
uuid = { version = "0.7", features = ["serde", "v4"] }
winapi = "0.3"
[dev-dependencies]
mocktopus = "0.7.0"
[workspace]
members = [
"mm2src/coins",
]
# The backtrace disables build.define("HAVE_DL_ITERATE_PHDR", "1"); for android which results in "unknown" function
# names being printed, but dl_iterate_phdr is present since API version 21 https://github.com/rust-lang/rust/issues/17520#issuecomment-344885468
# We're using 21 version for Android build so we're fine to use the patch.
# Consider removing once this issue is solved and fix applied to upstream repository
# https://github.com/rust-lang/backtrace-rs/issues/227
[patch.crates-io]
backtrace = { git = "https://github.com/artemii235/backtrace-rs.git" }
backtrace-sys = { git = "https://github.com/artemii235/backtrace-rs.git" }
num-rational = { git = "https://github.com/artemii235/num-rational.git" }