Skip to content

About

Run PWAs as lightweight standalone Windows apps on WebView2, with per-app profiles and automatic hibernation of minimized apps.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

pwa-runtime

한국어

A lightweight runtime that runs websites and Progressive Web Apps (PWAs) as standalone Windows apps, separate from your browser. Sites without a web app manifest install too, with the page's title and icon.

  • Engine: WebView2, which ships with Windows. Each app gets its own profile; no browser extensions run inside apps.
  • Lifecycle management: a minimized app first drops its memory use (Idle). After a while, all of its WebView2 processes are shut down (Hibernated). Opening it again reloads the page. Apps that are playing sound, using the camera, microphone or screen sharing, or downloading a file stay awake until they finish.
  • Origin always visible: the window title always shows which site the app comes from.
  • Browser button: an optional Edge/Chrome extension installs the site you are looking at, after you confirm in a Windows dialog.

Requirements

  • Windows 10/11 (x64) with the WebView2 Runtime (included in Windows 11)
  • To build: Rust (MSVC toolchain) and Visual Studio Build Tools (C++ x64 tools + Windows SDK)

Install

You don't need Rust to install.

  1. Download pwa-runtime-<version>-win-x64.zip from the latest release.
  2. Extract the zip, open PowerShell in the extracted folder, and run:
    .\pwa-runtime.exe setup        # per-user install, no admin rights needed
  3. Open a new terminal and install an app:
    pwa-runtime install --url https://memo.devnoco.com/
  4. Optional: add the browser button from the Chrome Web Store to install the site you are viewing with one click. The Microsoft Edge Add-ons listing is in review.

To remove the runtime, use Settings > Apps > Installed apps > PWA Runtime, or run pwa-runtime setup --uninstall (add --purge-apps to delete app data too).

setup places the binaries in %LOCALAPPDATA%\pwa-runtime\bin, adds that folder to the user PATH, registers the browser extension host (Edge/Chrome), registers the runtime under "Installed apps", and checks for the WebView2 Runtime. For the browser extension, see extension/README.md.

Usage

Building from source (see Requirements):

cargo build --release
.\target\release\pwa-runtime.exe doctor
.\target\release\pwa-runtime.exe inspect --url https://memo.devnoco.com/
.\target\release\pwa-runtime.exe run --url https://memo.devnoco.com/ --hibernate-after 30

Installed apps (Start menu)

.\target\release\pwa-runtime.exe install --url https://memo.devnoco.com/   # asks before installing (--desktop: add a desktop shortcut)
pwa-runtime list
pwa-runtime info memo.devnoco.com
pwa-runtime launch memo.devnoco.com          # run from a console (shows logs)
pwa-runtime update                           # check installed apps for name/icon changes and apply after confirming (--check: report only)
pwa-runtime manager                          # open the manager window
pwa-runtime icon memo.devnoco.com --file logo.png   # use your own icon (--reset: back to the site's icon)
pwa-runtime sleep                            # free memory used by minimized apps now (they reload when opened)
pwa-runtime uninstall memo.devnoco.com       # remove registration and shortcuts, keep user data
pwa-runtime uninstall memo.devnoco.com --purge-data   # also delete user data (cannot be undone)
  • Installing copies the binaries to %LOCALAPPDATA%\pwa-runtime\bin. Shortcuts point to pwa-launch.exe <app-id>, a GUI launcher with no console window.
  • Per-app folder: %LOCALAPPDATA%\pwa-runtime\apps\<app-id>\ holds app.json (registration), icon.ico, update.json (last update check) and window.json (window position and size). User data lives in the shared engine folder, engine\webview2\EBWebView\WV2Profile_<app-id>.
  • Once a day, opening an app or the manager re-checks the app's manifest. If the name or icon changed, the manager shows an "Update" button, and nothing changes until you confirm. The start URL and app ID never change. Websites installed without a manifest are not checked. An icon you set yourself (pwa-runtime icon or the manager) is never replaced.
  • The app ID is derived from the site's host name. Two apps on the same host (for example different paths, or different localhost ports) share one ID.

Runtime updates

pwa-runtime self-update --check   # only check the latest GitHub release
pwa-runtime self-update           # check, download and install
  • Once a day, opening the manager checks the latest GitHub release and shows a notice if a newer version exists. Installing always needs a click.
  • A downloaded release is installed only if its ed25519 signature verifies. The running binaries are moved aside to .old and removed on the next start. Apps that are already open switch to the new version after all of them are closed and reopened.

Developer options for run

Option Description
--hibernate-after <seconds> Time after minimizing before hibernating (default 30, 0 disables)
--app-id <id> Profile directory name (default: host name)
--browser-args <args> Extra WebView2 arguments (experimental)
--window-size <WxH> Initial window size (default 1200x800)

App data for run: %LOCALAPPDATA%\pwa-runtime\dev\<app-id>\webview2 (separate from installed apps)

Security

Apps run untrusted web content, so the runtime limits what a page can do: start URLs must be https (plain http only for localhost), top-level navigation is limited to http(s), new windows open in your default browser, and manifests and icons are fetched over https only. The browser extension can only ask to install a URL; the native host re-downloads the page and its manifest itself and installs only after you confirm in a Windows dialog.

To report a vulnerability, see SECURITY.md. What the runtime and the extension send, and where, is described in PRIVACY.md.

Development

cargo fmt --all
cargo clippy --all-targets -- -D warnings
cargo test

See CONTRIBUTING.md for how to contribute, and CHANGELOG.md for release notes.

Releasing (maintainers)

  1. Bump version in crates/*/Cargo.toml.
  2. Bump version in extension/manifest.json to the same version; packaging stops if they differ.
  3. Run ./scripts/package.ps1. It writes the zip and its signature (.zip.sig) to dist\, with the license files and THIRD_PARTY_LICENSES.txt inside the zip, and checks the signature against the public key installed runtimes trust. The signing key lives outside the repository at %USERPROFILE%\.pwa-runtime-release\signing.key; keep a separate backup. If the key is lost, installed runtimes cannot accept new releases.
  4. Create a GitHub release tagged v<version> and upload pwa-runtime-<version>-win-x64.zip and its .zip.sig.

First-time key setup only: cargo run -p release-sign -- keygen crates/installer/src/release_public_key.in

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Run PWAs as lightweight standalone Windows apps on WebView2, with per-app profiles and automatic hibernation of minimized apps.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages