Back end
Delivery: the same build, a strict policy, updates that ask
Examplea whole program
app "Mail" policy=strict connect="https://api.example.com" update=askstate build = ""state waiting = ""state forced = false// A newer build is on the server, fetched and checked, and waits.on app.update(u: {build: string, forced: bool}) waiting = u.build forced = u.forcedtask build = app.build()action change app.update()column gap=8 padding=24 text `Build ${build}` font-size=12 color=dim if waiting != "" row gap=8 align-items=center text `Build ${waiting} is ready` button "Change to it" press=change() if forced text "The app's loader was replaced without being asked." color=dangerMental model#
The same build every time#
The compiler, and the batteries#
Checking it#
build.txt and the build's hash#
The strict policy#
What is sent#
Who sends it#
What the runtime does another way#
A page drawn ahead#
What is refused#
Seeing what was refused#
Updates that ask#
How it is kept#
What a server may change#
A push handler under update=ask#
The installed app#
Examplea whole program
app "Mail" id="mail" scope="/" share="text links image/* .eml" handles="mailto" opens=".eml" shortcuts="New message: #/compose; Inbox: #/inbox"state given = ""// A share into the app, a mailto: link, or a .eml file opened with it.on app.handed(h: {how: string, title: string, text: string, url: string, files: picked[]}) let names = h.files.map(f => f.name).join(", ") given = `${h.how}: ${h.title} ${h.text} ${h.url} ${names}`column gap=8 padding=24 text givenWhat this does and does not give#
Pitfalls#
In the source#
Edit this page:
docs/delivery.md