日本語

Limits

The windows share six connections to the server, and each system needs its web view installed before the application runs.

At most five open streams

The windows reach the server over HTTP/1.1, and a web view keeps at most six connections to one host for all its windows together. A stream, such as a StreamAction a page opens, holds its connection for as long as the page is open. With six windows that each hold a stream, a seventh request waits until one of them closes. In WKWebView, the todo example's sixth window left the first window's actions unanswered.

Keep at most five streams open across all the windows, so one connection stays free for page loads and action calls. Nothing counts the streams: a sixth one compiles and opens, and the requests after it wait.

What each system needs

SystemWeb viewNeeded to run
macOSWKWebViewnothing beyond the system
WindowsWebView2the WebView2 Runtime, which Windows 11 includes
LinuxWebKitGTKWebKitGTK 4.1

Building on Linux needs the development files of WebKitGTK 4.1 and D-Bus, since hypersig_desktop links GTK and WebKitGTK there and the window reads the desktop's color scheme over D-Bus. On Ubuntu, CI installs these packages before it builds:

sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev libdbus-1-dev

CI builds and runs the examples on macOS, Windows, and Ubuntu, the latest runner image of each.

Other limits

  • App::run takes the thread that calls it for the windows and their event loop, and on macOS it panics unless that is the main thread. Call it from main, which is not #[tokio::main]; App::run starts the Tokio runtime itself.
  • Closing the last window closes the application, on macOS as well, unless a tray icon is shown. The server is then given five seconds to finish the requests it is answering, and App::run returns once it has stopped.
  • A window is shown once its page has loaded. A page that has not loaded in 10 seconds is shown anyway, and an error is logged.
  • The web inspector is on in a debug build and off in a release build.

Next

Streams covers the StreamAction that holds a connection. Smoke runs in CI opens the real window on each system in CI.