weirdnet-ext
The Weirdnet extension host: what an app (such as Morph) needs to install and run third-party extensions safely.
- Packages ([
package]): a tar archive withmanifest.json,manifest.sigand the files. The author's Weirdnet user key (Ed25519) signs the exact manifest bytes; the manifest lists every file with its size and BLAKE3 hash. Opening a package checks all of it and refuses unlisted files, links, unsafe paths and oversized archives. - Install and update rules ([
Installer]): one read-only directory per version; each extension id is pinned to its first author, so another key can't take it over (not even after an uninstall); an update must be newer; [Plan::new_capabilities] lists what an update adds so the app can ask the user; every launch hashes the files again. - Grants ([
Grants]): capabilities with optional*patterns, checked on every call; a revoked capability fails the next call. - Sandbox ([
sandbox]): empty environment, own process group, resource limits, parent-death signal, and only the private socket inherited. Linux addsno_new_privs, Landlock (files limited to the package, the system libraries and the data directory; TCP denied; abstract Unix sockets and signals scoped on 6.12+) and a seccomp filter (nosocket(), namespaces, mounts,ptrace,bpf,io_uring, keyrings, modules or terminal injection). macOS uses a deny-by-defaultsandbox-execprofile. Windows: not yet (WASM only). [sandbox::probe] reports what a machine gives; the default [Require::Full] refuses to run with less. - Supervisor ([
supervisor]): starts the extension with a fresh socket pair and a one-time token, serves the [broker] (weirdnet.ext.v1.Hostover gRPC), restarts crashes with backoff and gives up after repeated ones, stops idle extensions, and kills stuck ones after a grace period.
use Arc;
use ;
# async
Extensions are written with weirdnet-ext-sdk;
the wire contract is weirdnet-ext-proto.
BSD-3-Clause.