Skip to content

Commit

Permalink
fix: patch tlsn_wasm import in rayon worker helper
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Aug 2, 2024
1 parent a5acc42 commit 48231f8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/wasm/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/bin/bash

# Clean up older builds
rm -rf pkg

# Build tlsn_wasm package
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
rustup run nightly \
wasm-pack build --target web . -- -Zbuild-std=panic_abort,std

# Patch tlsn_wasm.js import in workerHelpers.worker.js
file=$(ls ./pkg/snippets/wasm-bindgen-rayon-*/src/workerHelpers.worker.js)
temp=$(mktemp)
sed 's|../../../|../../../tlsn_wasm.js|' "$file" >"$temp" && mv "$temp" "$file"

0 comments on commit 48231f8

Please sign in to comment.