{"id":50996801,"url":"https://github.com/lambdasistemi/plutus-browser","last_synced_at":"2026-06-20T10:32:26.417Z","repository":{"id":364051504,"uuid":"1266133942","full_name":"lambdasistemi/plutus-browser","owner":"lambdasistemi","description":"Browser UI for the wasm32 Plutus evaluator (UPLC playground + snippets). PureScript + MUI; depends on lambdasistemi/plutus releases.","archived":false,"fork":false,"pushed_at":"2026-06-11T13:16:31.000Z","size":57,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T13:24:45.522Z","etag":null,"topics":["browser","plutus","purescript","uplc","webassembly"],"latest_commit_sha":null,"homepage":"https://lambdasistemi.github.io/plutus-browser/","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdasistemi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T10:53:36.000Z","updated_at":"2026-06-11T13:16:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lambdasistemi/plutus-browser","commit_stats":null,"previous_names":["lambdasistemi/plutus-browser"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lambdasistemi/plutus-browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdasistemi%2Fplutus-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdasistemi%2Fplutus-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdasistemi%2Fplutus-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdasistemi%2Fplutus-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdasistemi","download_url":"https://codeload.github.com/lambdasistemi/plutus-browser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdasistemi%2Fplutus-browser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34566920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","plutus","purescript","uplc","webassembly"],"created_at":"2026-06-20T10:32:24.786Z","updated_at":"2026-06-20T10:32:26.398Z","avatar_url":"https://github.com/lambdasistemi.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plutus Browser\n\nBrowser UI for the wasm32 Plutus evaluator: UPLC playground with editor,\nevaluator output, and browser-local versioned snippets.\n\nLive app: \u003chttps://lambdasistemi.github.io/plutus-browser/\u003e\n\n## What is this\n\nPlutus Browser is a single-page application that evaluates Untyped Plutus\nCore (UPLC) programs entirely in the browser. It embeds `uplc.wasm` — the\nreal Plutus CEK machine and cost model compiled to wasm32-wasi from the\n32-bit-correct fork [lambdasistemi/plutus](https://github.com/lambdasistemi/plutus)\n(release [1.65.0.0-wasm32.1](https://github.com/lambdasistemi/plutus/releases/tag/1.65.0.0-wasm32.1)) —\nso evaluation results match the 64-bit chain byte for byte. No server is\ninvolved: the wasm binary is bundled into the page and runs through a WASI\nshim.\n\nThe UI is written in PureScript (react-basic + MUI, CodeMirror editor). It\nships 22 bundled example programs and lets you keep your own snippets, which\nare versioned in a browser-local git repository (isomorphic-git over\nlightning-fs, persisted in IndexedDB) — every edit is auto-committed, and\neach snippet's history can be viewed and restored.\n\n## Architecture\n\n```mermaid\nflowchart LR\n    subgraph BROWSER[\"Browser page (all client-side)\"]\n        APP[\"Uplc.App\u003cbr/\u003eReact + MUI UI\"]\n        EDITOR[\"CodeMirror editor\u003cbr/\u003eSpaKit.CodeMirror\"]\n        FMT[\"Uplc.Format\u003cbr/\u003eUPLC pretty-printer\"]\n        RUNNER[\"Uplc.Runner\"]\n        WASI[\"SpaKit.WasiRunner\u003cbr/\u003ebrowser_wasi_shim\"]\n        WASM[\"uplc.wasm\u003cbr/\u003ePlutus CEK + cost model\"]\n        GIT[\"SpaKit.BrowserGit + Uplc.SnippetStore\u003cbr/\u003eisomorphic-git\"]\n        IDB[(\"lightning-fs\u003cbr/\u003eIndexedDB: uplc-snippets-v1\")]\n    end\n    REL[\"lambdasistemi/plutus\u003cbr/\u003erelease 1.65.0.0-wasm32.1\"]\n    APP --\u003e EDITOR\n    APP --\u003e FMT\n    APP --\u003e|\"evaluate\"| RUNNER\n    RUNNER --\u003e WASI\n    WASI --\u003e|\"uplc evaluate [-c]\"| WASM\n    APP --\u003e|\"save / load / history\"| GIT\n    GIT --\u003e IDB\n    REL -.-\u003e|\"fetched at build time\"| WASM\n```\n\n- `src/Main.purs` mounts the React app; `src/Uplc/App.purs` is the whole UI\n  (drawer with snippets, examples and history; editor; controls; output).\n- `src/Uplc/Runner.purs` compiles the bundled wasm module and runs it as a\n  CLI: `uplc evaluate`, plus `-c` when the budget toggle is on.\n- `src/Uplc/Examples.purs` is **generated** from `examples/*.uplc` by\n  `scripts/generate-examples.mjs` — edit the `.uplc` files, not the module.\n- `src/bootstrap.js` is the esbuild entry that inlines `src/assets/uplc.wasm`\n  as bytes and exposes them to the PureScript side.\n- Snippets live in a git repository at `/repo` inside a lightning-fs\n  filesystem named `uplc-snippets-v1`; saves, renames and deletes are git\n  commits (`src/Uplc/SnippetStore.*`).\n\n## Install\n\nThere is nothing to install for normal use — open the\n[live app](https://lambdasistemi.github.io/plutus-browser/).\n\nTo build the static site yourself (output is plain HTML + JS, host anywhere):\n\n```sh\nnix build\n# result/ contains index.html and index.js\n```\n\n## Quickstart\n\n```sh\nnix develop\njust install   # npm ci\njust bundle    # downloads uplc.wasm, builds dist/\njust serve     # http://127.0.0.1:4173/\n```\n\nOpen the URL, pick an example (e.g. `01-add-integers`) and press\n**Evaluate** — the output panel shows `(con integer 42)`.\n\n## Usage\n\nEverything happens in the single page:\n\n- **Editor** — CodeMirror with a UPLC pretty-printer. **Format** re-indents\n  the program (2/4/8 spaces, selectable); *auto format* formats on blur.\n- **Evaluate** — runs the program through the wasm CEK. *auto evaluate*\n  re-runs after each edit (default debounce 350 ms, configurable). The\n  *show budget (-c)* toggle adds CPU and memory budget figures to the output.\n- **Snippets** — *Quick add snippet* creates an empty named snippet;\n  *new from...* creates one from a copy of an existing snippet, a local\n  file, or a URL. Rename and delete from each row's hover actions.\n- **Auto-versioning** — edits to a snippet are auto-committed (default\n  debounce 1500 ms). The **History** panel lists commits; selecting one\n  shows that version read-only, and **Restore version** commits it back.\n- **Examples** — bundled programs, editable in place (the row shows\n  *edited example*), but edits are not persisted until you press **Save as\n  my snippet**. Examples cover integer/bytestring\n  builtins, if-then-else, lambdas, recursion via fixpoint, lists,\n  constr/case, and tracing/error.\n\nSnippets are stored only in your browser (IndexedDB); clearing site data\ndeletes them.\n\n## Documentation\n\n- For AI agents, start at [AGENTS.md](AGENTS.md).\n- Evaluator provenance and releases: [lambdasistemi/plutus](https://github.com/lambdasistemi/plutus).\n\n## Development\n\n```sh\nnix develop            # purs, spago, esbuild, node 22, just, purs-tidy, chromium\njust build             # regenerate examples module + spago build\njust dev               # spago build --watch\njust fmt               # purs-tidy format-in-place\njust ci                # install + lint + build + bundle + test\n```\n\nTests are a Playwright suite (`test/uplc.spec.mjs`) that serves `dist/` and\nexercises the real wasm evaluator in headless Chromium: example loading and\nformatting, evaluation with and without budget, snippet creation from all\nsources, rename/delete, and persistence across reloads. Run with `just test`\n(needs a prior `just bundle`; the dev shell sets\n`PLAYWRIGHT_CHROMIUM_EXECUTABLE`).\n\nVerification as run by CI (`.github/workflows/ci.yml`):\n\n```sh\nnix build\nnix develop --quiet -c just ci\n```\n\nPushes to `main` deploy the nix-built site to GitHub Pages in workflow mode\n(`.github/workflows/pages.yml`); pull requests get a static preview\n(`.github/workflows/preview.yml`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdasistemi%2Fplutus-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdasistemi%2Fplutus-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdasistemi%2Fplutus-browser/lists"}