Skip to content

Commit

Permalink
I didn't have wasm-pack installed, let's fix that
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelff committed Nov 27, 2023
1 parent d04804d commit c6d1792
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions query-engine/query-engine-wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ OUT_NPM_NAME="@prisma/query-engine-wasm"
# This little `sed -i` trick below is a hack to publish "@prisma/query-engine-wasm"
# with the same binding filenames currently expected by the Prisma Client.
sed -i '' 's/name = "query_engine_wasm"/name = "query_engine"/g' Cargo.toml
# Check if wasm-pack is installed
if ! command -v wasm-pack &> /dev/null
then
echo "wasm-pack could not be found, installing now..."
# Install wasm-pack
# Replace with the appropriate installation command for your system
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
fi
wasm-pack build --dev --target $OUT_TARGET
sed -i '' 's/name = "query_engine"/name = "query_engine_wasm"/g' Cargo.toml

Expand Down

0 comments on commit c6d1792

Please sign in to comment.