-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathCargo.toml
62 lines (52 loc) · 1.86 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
[package]
name = "parsec"
# We don't use this version to set the version of parsec
# For that you're looking for `parsec/_version.py`
version = "0.0.0"
edition = "2021"
[lib]
name = "parsec"
crate-type = ["cdylib"]
[workspace]
members = [
"oxidation/libparsec",
"oxidation/libparsec/crates/*",
"oxidation/bindings/web",
"oxidation/bindings/electron",
"oxidation/bindings/android/libparsec/rust",
]
# Ignore bindings stuff given they are special snowflakes that require exotic toolchain and dependencies
default-members = ["oxidation/libparsec"]
[features]
test-utils = ["libparsec/test-utils"]
[dependencies]
libparsec = { path = "oxidation/libparsec" }
regex = "1.8.1"
paste = "1.0.12"
pyo3 = { version = "0.17.3", features = ["multiple-pymethods", "extension-module"] }
uuid = { version = "1.2.2", features = ["serde", "v4", "fast-rng"] }
tokio = { version = "1.28", features = ["rt", "rt-multi-thread"] }
lazy_static = "1.4.0"
futures = "0.3.28"
# Rust unoptimized code is really slow with crypto algorithm and regex compilation,
# hence we optimize our 3rd party dependencies.
[profile.dev.package."*"]
opt-level = 1
[profile.dev-python]
inherits = "dev"
# We don't optimize our own crates here given it comes with a high impact on
# when doing single change recompilation.
# Custom profiles for the CI. The idea here is to try to save compilation time
# and artifacts size (to keep cache efficient).
[profile.ci-rust]
inherits = "dev"
# Remove debug symbols saves roughly ~30% compilation time and ~50% artifacts size
debug = false
# Given we don't keep our crate in the cache, we always build them from the
# ground. Removing that saves ~20% in artifacts size.
incremental = false
[profile.ci-python]
inherits = "ci-rust"
# Using `opt-level = 0` divides by 2 compilation time, however it makes code run much
# slower which is a no-go for Python tests :'(
opt-level = 1