fix(web): hide unsupported plugin manager

Fixes #567
This commit is contained in:
Hakan Seven 2026-07-29 16:17:17 +03:00
commit 2424eeb74d
10 changed files with 56 additions and 22 deletions

View file

@ -18,6 +18,7 @@ browser can't provide. This page lists the differences.
| Parallelism | Multi-threaded (rayon) | Single-threaded |
| GPU backend | Vulkan / DX12 / Metal (wgpu) | WebGL2 (WebGPU where available) |
| Update check / external links | `ureq`, `open` | skipped / `window.open` |
| External plugins | Native packages + Plugin Manager | **No** — native libraries cannot run in a browser |
## Details
@ -76,6 +77,14 @@ native and sequential `std` iterators on wasm, so the same call sites run in
parallel on the desktop and serially in the browser. Large drawings are slower
on the web.
### External plugins — web: unavailable
Marketplace plugins are native `.dll`, `.so`, or `.dylib` packages launched in
an isolated child process. Browsers cannot load those libraries or spawn the
plugin runner, so the web build does not show the Plugin Manager or register
its commands. Installed desktop plugins remain in the per-user plugins folder
and load again on the next desktop launch.
### Platform shims (`src/sys.rs`)
- `open_url`: `open::that` on native, `window.open(_blank)` on web.
- `download_bytes`: web only (Blob + anchor download).

View file

@ -333,8 +333,9 @@ plugin dead, and reports a `CallTimeout` error via the normal plugin error path.
## Marketplace
The **Plugin Manager** (`PLUGINS` / `PLUGINMANAGER`, or the Start-page button)
installs plugins from GitHub Releases:
The desktop **Plugin Manager** (`PLUGINS` / `PLUGINMANAGER`, or the Start-page
button) installs plugins from GitHub Releases. It is hidden in the browser
build because marketplace packages are native dynamic libraries:
- **Curated registry** — [`plugins/registry.json`](../plugins/registry.json) in
this repo lists discoverable plugins. The host fetches it from `main` at
@ -343,7 +344,7 @@ installs plugins from GitHub Releases:
[`plugins/README.md`](../plugins/README.md)); merged PRs reach every user with
no app update.
- **Manual link** — *Add a repository* (`owner/repo`) for unlisted or private
dev repos; linked repos persist in `settings.txt` (`plugin_repos=`).
dev repos; linked repos persist in `settings.json`.
- **Install / upgrade / reinstall** — pick a release from the dropdown and
*Install*; the host downloads the platform asset + `plugin.toml` into the
plugins folder, checking `api_version` first. Reinstalling overwrites and