-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-wasm.bat
More file actions
36 lines (31 loc) · 969 Bytes
/
build-wasm.bat
File metadata and controls
36 lines (31 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
REM Build script for SQL Parser WASM
echo Building SQL Parser for WASM...
REM Check if wasm-pack is installed
wasm-pack --version >nul 2>&1
if %errorlevel% neq 0 (
echo wasm-pack not found. Installing...
cargo install wasm-pack
)
REM Build for web target
echo Building for web target...
wasm-pack build --target web --features wasm --out-dir pkg
if %errorlevel% equ 0 (
echo ✅ Build successful!
echo.
echo To test the WASM module:
echo 1. Serve the examples directory with a local HTTP server
echo 2. Open examples/wasm_example.html in your browser
echo.
echo Example using Python's built-in server:
echo python -m http.server 8000
echo # Then open http://localhost:8000/examples/wasm_example.html
echo.
echo Or using Node.js serve:
echo npx serve .
echo # Then open the provided URL and navigate to examples/wasm_example.html
) else (
echo ❌ Build failed!
exit /b 1
)
pause