Expand description
App manifests: optional TOML metadata shipped next to a .wasm module.
For a module at https://host/apps/app.wasm the browser looks for
https://host/apps/app.toml (same URL, .wasm → .toml). The manifest is optional —
apps without one keep the legacy behavior (no metadata, every sensitive API may prompt).
name = "Media Capture Demo"
description = "Camera preview, mic meter, and screenshots"
version = "0.1.0"
permissions = ["camera", "microphone", "screen-capture"]When a manifest is present it acts as a capability declaration: sensitive APIs not
listed in permissions are denied without prompting (the prompt is only shown for
declared permissions). Valid permission names are the PermissionKind::name values:
camera, microphone, geolocation, screen-capture.
Structs§
- AppManifest
- Parsed app manifest. All fields except
nameare optional in the TOML.
Functions§
- fetch_
manifest - Fetches the manifest for a module URL (HTTP/HTTPS or
file://). - load_
local_ manifest - Loads the sibling manifest for a local
.wasmfile. - manifest_
allows - Whether the current app may request
kind. - manifest_
path_ for - Sibling manifest path for a local
.wasmfile path. - manifest_
url_ for - Manifest URL for a
.wasmmodule URL (…/app.wasm→…/app.toml).
Type Aliases§
- Shared
Manifest - Shared handle stored in
HostState;Nonewhen the current app has no manifest.