# 🦆 no_std WASM Test
Proof that `waddling-errors-macros` generates code that runs in pure no_std WASM.
## Quick Test
```bash
# 1. Build WASM (already built - see no_std_wasm.wasm)
cargo build --example no_std_wasm \
--target wasm32-unknown-unknown \
--no-default-features \
--release
# 2. Run in browser
python -m http.server 8000
# Open: http://localhost:8000
```
Or use the build scripts:
```bash
./build.sh # Linux/Mac
build.bat # Windows
```
## What This Proves
✅ Macros run at **build time** with std (on dev machine)
✅ Generated code runs at **runtime** without std (in WASM)
✅ All macros work: `component!`, `primary!`, `sequence!`, `diag!`
✅ Binary size: **56 KB** (tiny!)
✅ Zero std dependency at runtime
## Files
- `index.html` - Browser test page (interactive)
- `no_std_wasm.wasm` - Compiled WASM binary
- `build.sh` / `build.bat` - Build scripts
- `../no_std_wasm.rs` - Source code
## Prerequisites
```bash
# Install WASM target (one-time)
rustup target add wasm32-unknown-unknown
# Python for HTTP server (browser test)
python --version
```
## Troubleshooting
**"Failed to fetch WASM"**
→ Run `build.sh` or `build.bat` first
**Build fails**
→ `rustup target add wasm32-unknown-unknown`
**Browser shows blank**
→ Check console (F12), try Chrome/Firefox
## Why This Matters
Same pattern as production crates:
- **serde** - Derives use std at build, output is no_std
- **embedded-hal** - Macros use std, traits are no_std
**This is not a claim - it's verified, working WASM.** 🚀
---
**56 KB | Zero std | Real WASM**