Compare commits

...

2 commits

Author SHA1 Message Date
Aaron Fenyes
edeb080745 Reduce repetition in run-examples.sh 2025-07-20 19:28:53 -07:00
Aaron Fenyes
f8e9624fe3 Make run-examples.sh less location-dependent 2025-07-20 19:06:26 -07:00

View file

@ -3,8 +3,18 @@
# Karol Kuczmarski. "Add examples to your Rust libraries" # Karol Kuczmarski. "Add examples to your Rust libraries"
# http://xion.io/post/code/rust-examples.html # http://xion.io/post/code/rust-examples.html
# #
# you should invoke this script by calling `sh` or another interpreter, rather
# than calling `souce`, to ensure that the script can find the manifest file for
# the application prototype
cargo run --example irisawa-hexlet; echo # find the manifest file for the application prototype
cargo run --example three-spheres; echo MANIFEST="$(dirname -- $0)/Cargo.toml"
cargo run --example point-on-sphere; echo
cargo run --example kaleidocycle # set up the command that runs each example
RUN_EXAMPLE="cargo run --manifest-path $MANIFEST --example"
# run the examples
$RUN_EXAMPLE irisawa-hexlet; echo
$RUN_EXAMPLE three-spheres; echo
$RUN_EXAMPLE point-on-sphere; echo
$RUN_EXAMPLE kaleidocycle