Allow use on x86_64 systems#46
Conversation
|
@greptile |
|
| Filename | Overview |
|---|---|
| packages/enclave/src/vm.ts | Adds qemuBinaryForHost() helper; threads the resolved binary into both checkQemuAvailable and VM.create() sandbox options — correctly closes the gap where the preflight check and VM launch could use different binaries. |
| packages/enclave/README.md | Install instructions updated for x86_64; minor wording ambiguity around the qemu-system-x86 package vs qemu-system-x86_64 binary name. |
| .changeset/red-vms-sneeze.md | Changeset entry for a patch bump with accurate description of the change. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[EnclaveVM.start / checkQemuAvailable] --> B[qemuBinaryForHost]
B --> C{process.arch}
C -->|arm64| D[qemu-system-aarch64]
C -->|x64| E[qemu-system-x86_64]
C -->|other| F[undefined → error / unavailable]
D --> G[execSync which …]
E --> G
G -->|found| H[VM.create sandbox.qemuPath]
G -->|not found| I[return install hint]
H --> J[Gondolin launches QEMU]
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/enclave/src/vm.ts:358
**Debian package name inconsistent with the binary**
The install hint for x86_64 suggests `qemu-system-x86`, but the binary that is actually checked and launched is `qemu-system-x86_64`. While `qemu-system-x86` is the correct Debian/Ubuntu package name (it ships `qemu-system-x86_64`), the README on line 10 also says `sudo apt install qemu-system-x86` — a user who copies that verbatim and then looks for a `qemu-system-x86` _binary_ will be confused. The hint would be clearer if it noted that the binary inside the package is `qemu-system-x86_64`.
```suggestion
const debianPackage = process.arch === "arm64" ? "qemu-system-aarch64" : "qemu-system-x86";
installHint = `Install with: sudo apt install ${debianPackage} (provides the ${qemuBinary} binary on Debian/Ubuntu) or sudo pacman -S qemu-full (Arch)`;
```
Reviews (2): Last reviewed commit: "Pass QEMU binary to enclave VM" | Re-trigger Greptile
Co-authored-by: GPT-5.5 <openai-codex-gpt-5.5@pi.local> Pi-Model: openai-codex/gpt-5.5
|
Thank you! |
This PR uses the system architecture to decide which QEMU binary to run. Allows for use on x86_64 machines.