Skip to main content

Qt for WebAssembly development server.

This server is intented to be used while developing and testing WebAssembly applications on a trusted network. It is not suitable for production use cases like distributing applicaitons to end users over public networks.

The server is an upgrade from the python one line server ("python -m http.server"), and offers the following features:

  • Zero-configuration / minimal configuration.

  • Support for binding to multiple addresses in addition to localhost. This is useful for e.g. testing on mobile devices on the same local network as the development machine. Address can be addded individually using the --address option. Pass the "-all" option to bind to all available addresses.

  • Support for generating https certificates using the mkcert utility. Many web features require a secure context. While "localhost" is considered a secure context (also when plain http is used), other addresses are not. Clicking through the "not secure" warnings is an option, but using a valid certificate improves flow.

  • Support for compression using brotli. By default, the server compresses when serving over a public, non-localhost address. (localhost is fast, enabling compression here usualually increases download time instead of doing the opposite). Compression be controlled with the --compress-always and --compress-never options.

  • Support for enabling cross-origin isolation mode. This sets the so-called COOP and COEP headers, which are required to enable SharedArrayBuffer and multithreading. Enable with the --cross-origin-isolation option. Note that this may impose additional restrictions on cross-origin requests.

TODO:

  • ipv6 support

Installation and Usage

pip install qtwasmserver

Usage exmaples:

qtwasmserver                            # Start server on localhost, serve $CWD
qtwasmserver /path/to/wasm/builds       # Specify web root path
qtwasmserver -p 1080                    # Start server(s) on custom port
qtwasmserver --all-interfaces           # Start server(s) on all network interfaces
qtwasmserver -a 10.0.0.2                # Start server on specific address, in addition to localhost
qtwasmserver --cross-origin-isolation   # Enable cross-origin isolation mode for multithreading
qtwasmserver -h                         # Show help

Using mkcert

qtwasmserver can optinally use mkcert to generate https certifacates. See https://github.com/FiloSottile/mkcert for installation and getting started instructions.

The basic flow is:

  1. Gereate a certificate authority (CA), and install that on all devices and browsers. This is a one time operation. mkcert will use thuis CA to sign certificates.
  2. Generate a certificate for each address you want to use. This is done automatically by this server.

The beneifit of this appraoch is that certificates can be generated locally, on demand, for each server address in use. This can be useful when for instance moving a development machine between home and office networks.

Release files for qtwasmserver 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qtwasmserver 0.1.5
File Size Uploaded
qtwasmserver-0.1.5.tar.gz 3.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for qtwasmserver 0.1.5
File Interpreter ABI Platform
qtwasmserver-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 3.7 MB

Release files / qtwasmserver-0.1.5.tar.gz

Download URL qtwasmserver-0.1.5.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
48d4ec90c6599e3ec238be7f08755d6c76e9e693beda9ab03069c8e79d7316b9
BLAKE2b-256 checksum
How to use checksums
bfea632eb8f557a767d9942a8da5dd2d6915c6fc648355ec0772d565febcd9c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.4

Release files / qtwasmserver-0.1.5-py3-none-any.whl

Download URL qtwasmserver-0.1.5-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e79a0b1f60bf1147ad095a60c4b616581b466a442dd455e36652a1d281534ca
BLAKE2b-256 checksum
How to use checksums
3cc522669fd79c8d776555d11e3b5c127a364d129d8bc9e557adda9298cb0e20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.4

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page