Frontend Runtime
/
Provider & Runtime Modes
Provider & Runtime Modes
One setting picks where the engine runs — browser, S3, or a remote server.
View as Markdown
llms.txt
<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.
app/_layout.tsx
tsx · copy
1
import
{
RAStackProvider
}
from
"rastack/provider"
;
2
3
export
default
function
App
()
{
4
return
(
5
<
RAStackProvider
mode
=
"local"
>
6
<
Routes
/>
7
</
RAStackProvider
>
8
);
9
}
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.
Good to know
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.
Build with AI
Every page is available as clean Markdown for LLMs and coding agents. Point one at the files below to build on top of React API Stack.
React API Stack · alpha · built to scale to millions