Skip to content

Commit 97ca058

Browse files
rexxarsclaude
andauthored
fix(groq-wasm): strip absolute paths from WASM binary (#34)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 54abf35 commit 97ca058

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/groq-wasm/scripts/build-wasm.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ fi
1818

1919
# Build WASM
2020
cd "$RUST_DIR"
21+
22+
# Remap absolute paths in panic messages to avoid leaking the build machine's
23+
# username and directory structure in the published WASM binary.
24+
export RUSTFLAGS="--remap-path-prefix=$HOME/.cargo=.cargo --remap-path-prefix=$RUST_DIR=."
25+
2126
wasm-pack build --target web --out-dir "$WASM_DIR" --release
2227

2328
# Clean up unnecessary files

0 commit comments

Comments
 (0)