# ProvSQL Playground

ProvSQL Studio running entirely in your browser: PostgreSQL with the ProvSQL provenance extension, compiled to WebAssembly. No install, no server, no account; everything runs on this page, on demo databases.

Your browser does not support JSPI. The Playground needs WebAssembly JavaScript Promise Integration, which your browser does not appear to enable, so it will not run here as-is. See the supported browsers below. (You can still try, but it will likely hang.)

Launch the Playground

First load fetches a few megabytes (PostgreSQL and Python, as WebAssembly) and takes a few seconds; it is then cached.

Everything runs in-process; external tools are not available. The browser cannot launch helper programs, so the external knowledge compilers (d4, c2d, miniC2D, dsharp, weightmc) and graph-easy are absent, and options that rely on them do not appear. Probability is computed with ProvSQL's built-in tree-decomposition compiler. Everything else works: semiring evaluation, where-provenance, Shapley and Banzhaf values, continuous random variables, and circuit / tree-decomposition rendering (via a WebAssembly Graphviz).

## Browser support

The Playground relies on JSPI (WebAssembly JavaScript Promise Integration), so it needs a recent browser:

Browser | Status
--- | ---
Chrome / Edge 137+ | Works out of the box.
Firefox | Works once JSPI is enabled (one-time flag, below).
Safari | Not supported yet (no JSPI).

## Enabling JSPI in Firefox

1. Open `about:config` (accept the warning).
2. Search for `javascript.options.wasm_js_promise_integration`.
3. Set it to `true`, then reload this page.

Prefer a real install? ProvSQL and ProvSQL Studio run on any PostgreSQL: see the documentation.

Curious how it works? The developer documentation explains the architecture: PostgreSQL and ProvSQL compiled to WebAssembly via PGlite, Pyodide running the unmodified Studio Python, the JSPI bridge, and the self-hosted static build.