File tree Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,22 @@ set -e
22
22
23
23
[ -e footprint.toml ] && e " footprint.toml already exists"
24
24
25
- bool () { if [ -n " $1 " ]; then echo " $2 " ; else echo " $3 " ; fi ; }
25
+ APPLET=exercises/part-7-sol
26
+ RUNNER=nordic
26
27
27
- applet=exercises/part-7-sol
28
- runner=nordic
29
- for native in ' ' --native-target=thumbv7em-none-eabi; do
30
- for opt_level in ' ' --opt-level=z; do
31
- for release in ' ' --release; do
32
- config=" $( bool " $release " release debug) $( bool " $native " native wasm) "
33
- config=" $config $( bool " $opt_level " small fast) "
34
- x cargo xtask --footprint=" $config " \
35
- $release $native applet rust $applet $opt_level
36
- x cargo xtask --footprint=" $config " \
37
- $release ${native: +--native} runner $runner $opt_level
38
- done
39
- done
40
- done
28
+ measure () {
29
+ local release
30
+ local native
31
+ local opt_level
32
+ [ $1 = release ] && release=--release
33
+ [ $2 = native ] && native=--native-target=thumbv7em-none-eabi
34
+ [ $3 = small ] && opt_level=--opt-level=z
35
+ x cargo xtask --footprint=" $* " $release $native applet rust $APPLET $opt_level
36
+ [ $2 = native ] && native=--native
37
+ x cargo xtask --footprint=" $* " $release $native runner $RUNNER $opt_level
38
+ }
39
+
40
+ measure debug wasm fast
41
+ measure release wasm fast
42
+ measure release native fast
43
+ measure release native small
You can’t perform that action at this time.
0 commit comments