WEFT_OS/infra/vm/run.sh
Marco Allegretti e3504c324b feat(infra): NixOS VM config, CI type-check job, documentation
- flake.nix, infra/nixos/: NixOS VM with Mesa, virtio-gpu, Wayland,
  systemd user services for compositor and session supervisor
- infra/vm/: QEMU build and run scripts
- .github/workflows/ci.yml: add Linux job to type-check weft-servo-shell
  and weft-app-shell with --features servo-embed
- docs/architecture.md, docs/security.md, docs/building.md: replace
  stale pre-implementation design documents
- README.md: rewrite to reflect current codebase
- crates/weft-servo-shell/SERVO_PIN.md: update implementation status and add
  SpiderMonkey process boundary statement
2026-03-12 20:03:25 +01:00

27 lines
680 B
Bash

#!/usr/bin/env bash
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
IMAGE="${1:-"${REPO_ROOT}/infra/vm/weft-vm.qcow2"}"
if [ ! -f "$IMAGE" ]; then
echo "error: $IMAGE not found; run infra/vm/build.sh first" >&2
exit 1
fi
MEM="${WEFT_VM_MEM:-4096}"
CPUS="${WEFT_VM_CPUS:-4}"
DISPLAY_OPT="${WEFT_VM_DISPLAY:-gtk,gl=on}"
exec qemu-system-x86_64 \
-enable-kvm \
-m "${MEM}M" \
-smp "${CPUS}" \
-drive "file=${IMAGE},format=qcow2,if=virtio" \
-vga virtio \
-display "${DISPLAY_OPT}" \
-device virtio-net-pci,netdev=net0 \
-netdev user,id=net0 \
-device virtio-rng-pci \
-serial mon:stdio \
"$@"