Short (up to 65,535 bytes) immutable strings to e.g. parse tokens, implemented in Rust. These are sometimes called "German Strings", because Germans have written the paper mentioning them
1[tasks.build]
2command = "cargo"
3args = ["build"]
4description = "Build the library"
5
6[tasks.clean]
7command = "cargo"
8args = ["clean"]
9description = "Clean generated files"
10
11[tasks.lint]
12command = "cargo"
13args = ["clippy"]
14description = "Run Clippy"
15
16[tasks.example]
17command = "cargo"
18args = ["run", "--example", "example"]
19description = "Run the example"
20
21[tasks.docs]
22command = "cargo"
23args = ["doc", "--all-features"]
24description = "Generate Documentation"
25
26[tasks.doc-test]
27command = "cargo"
28args = ["test", "--doc"]
29description = "Run Doctests"
30
31[tasks.cov]
32command = "cargo"
33install_crate = "cargo-llvm-cov"
34args = [
35 "llvm-cov",
36 "nextest",
37 "--all-features",
38 "--lcov",
39 "--output-path",
40 "lcov.info",
41]
42description = "Run Tests with Coverage"
43
44[tasks.test]
45command = "cargo"
46install_crate = "cargo-nextest"
47args = ["nextest", "run", "--all-features"]
48description = "Run all tests"
49
50[tasks.mutation]
51command = "cargo"
52install_crate = "cargo-mutants"
53args = ["mutants", "--test-tool=nextest", "--", "--all-features"]
54description = "Run Mutation Tests"
55
56[tasks.mutation-iterate]
57command = "cargo"
58install_crate = "cargo-mutants"
59args = ["mutants", "--test-tool=nextest", "--iterate", "--", "--all-features"]
60description = "Run only failed Mutation Tests"
61
62[tasks.miri-example]
63command = "cargo"
64args = ["miri", "run", "--example", "example"]
65env = { MIRIFLAGS = "-Zmiri-backtrace=full -Zmiri-tree-borrows" }
66description = "Run Miri on the example executable"
67
68[tasks.miri]
69command = "cargo"
70args = ["miri", "nextest", "run", "-j", "10"]
71env = { PROPTEST_DISABLE_FAILURE_PERSISTENCE = "true", MIRIFLAGS = "-Zmiri-env-forward=PROPTEST_DISABLE_FAILURE_PERSISTENCE -Zmiri-backtrace=full -Zmiri-tree-borrows" }
72description = "Run Miri on all test. WARNING: takes more than 10 hours!"
73
74[tasks.last-changelog]
75script_runner = "@duckscript"
76description = "Check the version given as command line argument against the latest version in the change log. If they are the same, write the latest changelog entry to 'last_changelog.md'. This is very fragile to whitespaces in the change log!"
77script = '''
78full_changelog = readfile CHANGELOG.md
79handle = split ${full_changelog} "## Version"
80last_w = array_get ${handle} 1
81last = trim_start ${last_w}
82version_arr = split ${last} " "
83version_w = array_get ${version_arr} 0
84version = trim ${version_w}
85args = array ${CARGO_MAKE_TASK_ARGS}
86exp_version = array_get ${args} 0
87echo Checking versions ${exp_version} ?= ${version}
88if semver_is_equal ${version} ${exp_version}
89 echo Versions OK!
90 text_arr = array "## Version" ${last}
91 text = array_join ${text_arr} ""
92 writefile last_changelog.md ${text}
93else
94 echo Version mismatch, ERROR!
95 exit 1
96end
97'''