Skip to content

Commit f98b9f6

Browse files
committed
fix: correct bash script formatting and improve clarity for WASM build process
1 parent abd265d commit f98b9f6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

#!/bin/bash

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
1+
#!/bin/bash
2+
# Install Rust
23
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
3-
. $HOME/.cargo/env
4+
source "$HOME/.cargo/env"
5+
# Add WASM target
46
rustup target add wasm32-unknown-unknown
7+
# Install wasm-pack
58
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
9+
# Build WASM module
610
wasm-pack build --target web
11+
# Copy to public directory
712
mkdir -p public/pkg
813
cp -r pkg/* public/pkg/

0 commit comments

Comments
 (0)