# Local WASM Dev

> Run the entire API in the browser over WebAssembly — no server, no network.

The whole API compiles to WebAssembly and runs **in the browser** for local development. There is no server and no network — the engine, the Iceberg store, and access control all execute client-side.

## Build the bundle

```bash title="terminal"
# needs the wasm32-unknown-unknown target + wasm-bindgen-cli
npx rastack wasm
```

This compiles `rastack-wasm` — wasm-bindgen bindings that expose `rastack-api-core` and a portable `IcebergStore` to JavaScript as a `RastackApi` class with `handle`, `seedFile`, and `export/importWarehouse`.

## How local mode seeds data

1. The provider walks the committed `data/warehouse` Iceberg files over HTTP.
2. It feeds them into the in-memory `MemoryBackend` via `seedFile`.
3. The warehouse is snapshotted into IndexedDB with `exportWarehouse` so reloads are instant and offline.

## The same brain, everywhere

Everything real in `rastack-wasm` is gated to `wasm32`, so it is an empty crate in the native `cargo test --workspace`. The logic that runs in the browser is the exact `rastack-api-core` that the server runs — identical CRUD, foreign-key validation, and access-control rules.

> **Tip:** Because `ParquetCodec` is the default in every build, the browser reads and writes the same `.parquet` data files as the server.

---

_Source: [https://reactapistack.com/docs/local-wasm](https://reactapistack.com/docs/local-wasm) · Full docs as one file: [llms-full.txt](https://reactapistack.com/llms-full.txt)_
