Skip to content

webassembly: an all-apps page, Home and every app frozen into one runtime - #707

Merged
bdbarnett merged 1 commit into
mainfrom
wasm-allapps-pr
Nov 26, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
wasm-allapps-pr

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

A second browser build: Home and every app of the apps repository frozen into one WebAssembly runtime, with everything the apps import, so the page boots into Home and fetches no packages. Apps that can't work in a browser are still in and say what they lack. The shared build (the omnipython variant, which the website, docs examples and workbench load) doesn't change.

One command builds it, with its inputs as arguments: scripts/build_wasm_allapps.py --apps-ref main --omnipython-ref main --out site. It fetches the two repositories at those refs, builds the new allapps variant with build_mp.py, and writes index.html, the runtime, its provenance and allapps.json (the commits that went in). The variant's manifest takes what to freeze from each app's package.json, as omip reads it, rather than a list kept by hand. build_mp.py gains --library-checkout and --library-source NAME=PATH, so the library and applibs come from the refs asked for instead of the pins. A manual-dispatch workflow, All-apps browser page, runs the same command and uploads the page as an artifact without publishing anything. docs/guides/build-the-all-apps-page.md covers inputs, output, serving, size (11.2 MB, 4.9 MB gzipped) and time (2 min 25 s from scratch on 4 cores), CI, and how it differs from the shared build.

This branch carries #706's commit (os.dupterm), which the REPL app needs; it will drop out once #706 merges. I built it from apps and omnipython main, then again with PyDevices/apps#293's fixes, and drove it in headless Chromium: Home boots with its six tabs, every app opens or says why it can't run in a browser, REPL (from its Home tile and from ?app=repl) runs print(6*7) and prints 42 through vtterm's display keyboard, Shell runs ls, and no request goes anywhere but the page's own server except Backline's default drum kit, a GitHub release download that the browser refuses for CORS. The new LibraryRefs tests pass, as do the rest of test_build_mp and test_provenance now that the branch is on main after #705 (the commit message's note that four failures happen on main was written before that rebase). The workflow itself hasn't run yet.

…time

scripts/build_wasm_allapps.py --apps-ref REF --omnipython-ref REF --out DIR
builds the webassembly port's new allapps variant and writes a page to
serve as it is: index.html, which boots into Home, the runtime, its
provenance, and allapps.json with the commits that went in. The variant is
the omnipython variant's runtime plus every app of the apps checkout and
everything their package.json files list, frozen, so the page fetches
nothing at run time. An app that can't work in a browser is in, and says
what it lacks.

build_mp.py takes --library-checkout PATH and --library-source NAME=PATH,
so the library and applibs come from the refs asked for instead of the
pins. The wasm bridge builds for the allapps variant too. The shared build,
the omnipython variant, doesn't change.

A manual-dispatch workflow, All-apps browser page, runs the same command
and uploads the page as an artifact; it publishes nothing. The guide,
docs/guides/build-the-all-apps-page.md, says what it builds, its inputs,
how to serve it, its size and time, and how it differs from the shared
build.

Built locally from apps and omnipython main and driven in headless
Chromium: Home boots with its tabs, every app opens or says why it can't
run here, REPL runs print(6*7) and prints 42, and no request leaves the
page's own server except Backline's default drum kit download. The new
LibraryRefs tests pass; test_build_mp's other failures are on main too.
@bdbarnett
bdbarnett merged commit 4b02192 into main Nov 26, 2026
48 of 50 checks passed
@bdbarnett
bdbarnett deleted the wasm-allapps-pr branch November 26, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant