Debian Codegraph @

scripts/wasirun-wrapper

raw
1 #!/bin/bash
2 #
3 # Wrapper script for wasirun to be executable by go test -exec
4 #
5
6 which wasirun || go install github.com/stealthrocket/wasi-go/cmd/[email protected]
7
8 # Make temp dir for for mapping into wasirun
9 map_dir=$(mktemp -d)
10
11 main_wasm=$1
12 shift
13
14 wasirun --dir=${map_dir} ${main_wasm} -- $*