一键导入
infra-worker
Handles Docker builds, QEMU Wasm compilation, C code for display backend, and native QEMU validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Handles Docker builds, QEMU Wasm compilation, C code for display backend, and native QEMU validation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | infra-worker |
| description | Handles Docker builds, QEMU Wasm compilation, C code for display backend, and native QEMU validation. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features involving:
Read the feature description, preconditions, expectedBehavior, and verificationSteps carefully. Read AGENTS.md for boundaries and conventions. Read .factory/library/architecture.md and .factory/library/environment.md for technical context. Read the research documents in the repo root (QEMU_WASM_RESEARCH.md, QEMU_WASM_DISPLAY_RESEARCH.md, RESEARCH_QEMU_DOCKER_TESTING.md, RESEARCH_ISO_HOSTING.md) for detailed technical reference.
For features that produce verifiable output (build artifacts, screenshots):
For Docker/build features, the "test" may be a shell script that verifies artifact existence and sizes.
Follow the feature's expectedBehavior precisely. Key patterns:
For Docker builds:
--without-default-features --enable-system for QEMU configure-sASYNCIFY=1 -sPROXY_TO_PTHREAD=1 -sTOTAL_MEMORY=2300MB -sWASM_BIGINT -sFORCE_FILESYSTEMFor the display backend (ui/emscripten.c):
For native QEMU validation:
-display none -monitor telnet:0.0.0.0:4444,server,nowait -m 2048 -cdrom TempleOS.ISO -boot d -rtc base=localtimescreendump monitor commandFor asset packaging:
Run all verification steps from the feature definition. For build features:
Run the project's test suite: npm test (if tests exist at this point).
Run typecheck: npm run typecheck (if applicable).
For build artifacts: manually inspect key files (ls -la, file type check). For native QEMU: convert PPM screenshot to viewable format and inspect. For display backend: review C code for correctness against QEMU DisplayChangeListener API.
Document all manual checks in the handoff.
{
"salientSummary": "Built QEMU Wasm for x86_64 with custom Emscripten display backend. Docker build completed in 28 minutes. Output: qemu-system-x86_64.wasm (34MB), JS glue (343KB), worker.js. Display backend exports framebuffer via EMSCRIPTEN_KEEPALIVE and accepts keyboard/mouse input.",
"whatWasImplemented": "Created Dockerfile based on ktock/qemu-wasm with Emscripten SDK 3.1.50. Cross-compiled GLib 2.84.0, zlib 1.3.1, libffi, Pixman 0.44.2. Created ui/emscripten.c with DisplayChangeListener registration, framebuffer pointer export (qemu_display_data, qemu_display_width, qemu_display_height), keyboard input (qemu_input_send_key), and mouse input (qemu_input_send_mouse). Modified meson.build to include emscripten display backend. Build script (build.sh) handles full pipeline.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "docker build -t qemu-wasm-builder .", "exitCode": 0, "observation": "Docker image built successfully with all Emscripten dependencies" },
{ "command": "./build.sh", "exitCode": 0, "observation": "QEMU Wasm build completed in 28 minutes" },
{ "command": "ls -la dist/", "exitCode": 0, "observation": "qemu-system-x86_64.wasm (34,521,088 bytes), qemu-system-x86_64.js (343,012 bytes), qemu-system-x86_64.worker.js (4,521 bytes)" }
],
"interactiveChecks": [
{ "action": "Inspected ui/emscripten.c for QEMU API compliance", "observed": "Uses DisplayChangeListener with dpy_gfx_update and dpy_gfx_switch. EMSCRIPTEN_KEEPALIVE on 6 exported functions. QKeyCode mapping for keyboard input." }
]
},
"tests": {
"added": [
{ "file": "scripts/verify-build.sh", "cases": [{ "name": "check-wasm-exists", "verifies": "Wasm binary exists and is >= 20MB" }, { "name": "check-bios-files", "verifies": "All 4 BIOS/ROM files present" }] }
]
},
"discoveredIssues": []
}