Skip to main content

Module pwa

Module pwa 

Source
Expand description

The installable-PWA artifact generator.

generate_pwa turns a QappManifest into a PwaBundle — an in-memory set of files (manifest.webmanifest, sw.js, index.html) forming a standards-compliant PWA scaffold that wraps and loads the qapp’s wasm bundle. It is pure domain code: it produces bytes/strings, it does not write to disk and it does not serve anything.

Scope honesty: the scaffold is correct and installable in principle, but a browser will only offer to install a PWA when it is served from a secure origin (HTTPS, or localhost for development) with the manifest and service worker reachable under scope. That secure-origin delivery layer is a separate, later piece. This module also does not compile wasm — it wires up a loader for the bundle referenced by QappManifest::entry_wasm.

Structs§

PwaBundle
A generated, installable PWA scaffold: an ordered collection of PwaFiles.
PwaFile
One file in a generated PWA bundle, addressed by its path relative to the served scope.

Enums§

PwaContent
A generated file’s contents — text (UTF-8) or opaque bytes.

Functions§

generate_pwa
Generate a standards-compliant, installable PWA scaffold for a qapp.