Skip to content

Commit

Permalink
chore(runtime) always build Wasmer without webc
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Jul 13, 2023
1 parent 98aa3ef commit f2f6a36
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions util/runtimes/wasmer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,26 @@ build_wasmer() {
rm -rf target
fi

# We call cargo directly to avoid the webc_runner feature flag.
#
#RUSTFLAGS=$NGX_BUILD_WASMER_RUSTFLAGS \
#ENABLE_LLVM=0 \
# make build-capi
RUSTFLAGS=$NGX_BUILD_WASMER_RUSTFLAGS \
ENABLE_LLVM=0 \
make build-capi
cargo build \
--manifest-path lib/c-api/Cargo.toml \
--release \
--no-default-features \
--features wat,compiler,wasi,middlewares \
--features wasmer-artifact-create,static-artifact-create \
--features wasmer-artifact-load,static-artifact-load \
--features cranelift

### check

if strings target/release/libwasmer.* | grep -q 'webc::'; then
fatal "failed to build Wasmer without webc."
fi

### install

Expand All @@ -138,8 +155,12 @@ arch="${3:-$(uname -m)}"
mode="$4"
clean="$5"

if [ "$mode" = "download" ]; then
download_wasmer "$target" "$version" "$arch" "$clean"
else
build_wasmer "$target" "$version" "$arch" "$clean"
fi
# We avoid downloading the Wasmer binaries for now
# and always build from source to avoid the webc_runner feature flag.
#
#if [ "$mode" = "download" ]; then
# download_wasmer "$target" "$version" "$arch" "$clean"
#else
# build_wasmer "$target" "$version" "$arch" "$clean"
#fi
build_wasmer "$target" "$version" "$arch" "$clean"

0 comments on commit f2f6a36

Please sign in to comment.