1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00
libsodium/test/default/wasi-test-wrapper.sh

15 lines
387 B
Bash
Raw Normal View History

2019-04-08 12:45:08 -07:00
#! /bin/sh
if command -v wasmtime >/dev/null; then
wasmtime -o --dir=. "$1" && exit 0
fi
if command -v wasmer >/dev/null; then
wasmer run "$1" --dir=. && exit 0
fi
if command -v lucetc-wasi >/dev/null && command -v lucet-wasi >/dev/null; then
lucetc-wasi \
--min-reserved-size "128MiB" \
-o "${1}.so" --opt-level best "$1" &&
lucet-wasi --dir=.:. "$1.so" && exit 0
fi