#!/bin/bash12# Helper script to execute a `*.wast` test in Miri. This is only lightly used on3# CI and is provided here to assist with development of anything that ends up4# using unsafe for example.5#6# Example usage is:7#8# ./ci/miri-wast.sh ./tests/spec_testsuite/br_if.wast9#10# extra flags to this script are passed to `cargo run wast` which means they11# must be suitable flags for the `wast` subcommand.1213set -ex1415rm -rf ./miri-wast16mkdir ./miri-wast17cargo run -- wast --target pulley64 --precompile-save ./miri-wast "$@" \18-O memory-reservation=$((1 << 20)) \19-O memory-guard-size=0 \20-O signals-based-traps=n \21-O memory-init-cow=n2223MIRIFLAGS="$MIRIFLAGS -Zmiri-disable-isolation -Zmiri-permissive-provenance" \24cargo miri run -- wast -Ccache=n --target pulley64 --precompile-load ./miri-wast "$@" \25-O memory-init-cow=n262728