# Provider & Runtime Modes

> One setting picks where the engine runs — browser, S3, or a remote server.

`<RAStackProvider mode=…>` is the single setting that picks where the API runs. It reconfigures the shared axios client in place, so **the generated hooks are unchanged across modes**.

```tsx title="app/_layout.tsx"
import { RAStackProvider } from "rastack/provider";

export default function App() {
  return (
    <RAStackProvider mode="local">
      <Routes />
    </RAStackProvider>
  );
}
```

## The three modes

| Mode | Where the engine runs |
| --- | --- |
| `local` | The WASM engine over an in-memory Iceberg warehouse, seeded from the committed `data/warehouse` files and persisted to IndexedDB. |
| `s3` | The same WASM engine, warehouse walked from / and saved to S3 (roadmap). |
| `remote` | Classic HTTP to `rastack serve` or a Lambda. |

## Why hooks don't change

In `local` and `s3` modes the provider installs a WASM adapter that dispatches requests into `RastackApi.handle` instead of the network. In `remote` mode it points the same client at a base URL. Either way, the hooks call the identical client interface.

> **Note:** Mode switching is a runtime concern, not a build concern. You can ship one bundle that runs entirely offline in development and against a Lambda in production.

> **Tip:** To build the browser bundle of the engine, see [Local WASM Dev](https://reactapistack.com/docs/local-wasm.md).

---

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