arnaucube
arnaucube/miden-cryptoPublic Self-hosted repository
miden-crypto/Makefile.toml
Makefile.tomlRaw
 1# Cargo Makefile
 2
 3# -- linting --------------------------------------------------------------------------------------
 4[tasks.format]
 5toolchain = "nightly"
 6command = "cargo"
 7args = ["fmt", "--all"]
 8
 9[tasks.format-check]
10toolchain = "nightly"
11command = "cargo"
12args = ["fmt", "--all", "--", "--check"]
13
14[tasks.clippy-default]
15command = "cargo"
16args = ["clippy","--workspace", "--all-targets", "--", "-D", "clippy::all", "-D", "warnings"]
17
18[tasks.clippy-all-features]
19command = "cargo"
20args = ["clippy","--workspace", "--all-targets", "--all-features", "--", "-D", "clippy::all", "-D", "warnings"]
21
22[tasks.clippy]
23dependencies = [
24  "clippy-default",
25  "clippy-all-features"
26]
27
28[tasks.fix]
29description = "Runs Fix"
30command = "cargo"
31toolchain = "nightly"
32args = ["fix", "--allow-staged", "--allow-dirty", "--all-targets", "--all-features"]
33
34[tasks.lint]
35description = "Runs all linting tasks (Clippy, fixing, formatting)"
36run_task = { name = ["format", "format-check", "clippy", "docs"] }
37
38# --- docs ----------------------------------------------------------------------------------------
39[tasks.doc]
40env = { "RUSTDOCFLAGS" = "-D warnings" }
41command = "cargo"
42args = ["doc", "--all-features", "--keep-going", "--release"]
43
44# --- testing -------------------------------------------------------------------------------------
45[tasks.test]
46description = "Run tests with default features"
47env = { "RUSTFLAGS" = "-C debug-assertions -C overflow-checks -C debuginfo=2" }
48workspace = false
49command = "cargo"
50args = ["test", "--release"]
51
52[tasks.test-no-default-features]
53description = "Run tests with no-default-features"
54env = { "RUSTFLAGS" = "-C debug-assertions -C overflow-checks -C debuginfo=2" }
55workspace = false
56command = "cargo"
57args = ["test", "--release", "--no-default-features"]
58
59[tasks.test-all]
60description = "Run all tests"
61workspace = false
62run_task = { name = ["test", "test-no-default-features"], parallel = true }
63
64# --- building ------------------------------------------------------------------------------------
65[tasks.build]
66description = "Build in release mode"
67command = "cargo"
68args = ["build", "--release"]
69
70[tasks.build-no-std]
71description = "Build using no-std"
72command = "cargo"
73args = ["build", "--release", "--no-default-features", "--target", "wasm32-unknown-unknown"]
74
75[tasks.build-avx2]
76description = "Build using AVX2 acceleration"
77env = {  "RUSTFLAGS" = "-C target-feature=+avx2" }
78command = "cargo"
79args = ["build", "--release"]
80
81[tasks.build-sve]
82description = "Build with SVE acceleration"
83env = { "RUSTFLAGS" = "-C target-feature=+sve" }
84command = "cargo"
85args = ["build", "--release"]
86