WEFT_OS/crates
Marco Allegretti 044634692f
fix(runtime): bound component memory and app messages
The runtime set no limits of its own:
- A component could grow its linear memory until the host ran out, with
  no ceiling at all where systemd is unavailable.
- An app message could contain line breaks and split into several
  messages.
- An overlong message from weft-appd was buffered without bound.
- A closed connection looked the same as an empty one.

The Wasmtime store now has a limiter: linear memory is capped at 256 MiB
by default (--max-memory-mib changes it), and tables and instances are
bounded too. A memory that would grow past the limit does not grow, and
the component sees an allocation failure.

App messages are single lines of at most 64 KiB, the limit weft-appd
applies. A longer message, or one containing a line break, is refused.
A longer line from weft-appd ends the connection, and sending afterwards
reports that it is closed. The systemd scope also gets TasksMax=64.

The grants probe component now also tries a 300 MiB allocation and the
two refused messages. tests/runtime/check_grants.py checks that the
allocation fails at the default limit and succeeds with a 512 MiB
limit.
2026-10-09 18:23:07 +00:00
..
weft-app-shell Merge remote-tracking branch 'origin/fix/confine-app-renderer' into fix/resolve-verified-package 2026-10-09 10:29:32 +00:00
weft-appd fix(runtime): bound component memory and app messages 2026-10-09 18:23:07 +00:00
weft-build-meta Initialize Rust workspace and repository metadata 2026-03-10 18:47:06 +01:00
weft-compositor fix(compositor): collapse nested submit condition in winit backend 2026-10-09 08:09:41 +00:00
weft-file-portal fix(runtime): enforce effective capability grants per session 2026-10-09 08:08:58 +00:00
weft-ipc-types test(appd): launch complete packages in the supervisor tests 2026-10-09 10:18:36 +00:00
weft-mount-helper fix(appd): resolve each launch to one package and fail closed on images 2026-10-09 10:03:40 +00:00
weft-pack test(appd): launch complete packages in the supervisor tests 2026-10-09 10:18:36 +00:00
weft-runtime fix(runtime): bound component memory and app messages 2026-10-09 18:23:07 +00:00
weft-servo-shell build(servo): trace pending classic scripts instead of rooting them 2026-10-09 10:29:24 +00:00