src/qemu.rs — run (direct-kernel-boot launch + exit-status handling)
Pure code movement: no behavior change, no new logic. One stale comment ("5-second timeout") removed since master's rework dropped the timeout wrapper.
Verification
cargo fmt --check, cargo clippy -- -D warnings, cargo test (2 tests, now registry::tests::*) pass
slim build mock-vm → succeeds end-to-end
slim run '../../evil' → rejected, exit 1
slim run nonexistent → proper missing-artifact error
@hulthe please review — will not merge until approved (and after #4).
Follow-up to #4 — main.rs (288 lines) was getting cramped, so the functions live in modules now. **Stacked on #4**; rebase to master once that merges.
## Layout
- `src/main.rs` (43 lines) — CLI definition and dispatch only
- `src/registry.rs` — `validate_image_name`, `registry_dir` + the unit tests
- `src/build.rs` — `mount_image`, `build_artifacts` (podman unshare pipeline, vmlinuz extraction, cpio→gzip initrd)
- `src/qemu.rs` — `run` (direct-kernel-boot launch + exit-status handling)
Pure code movement: no behavior change, no new logic. One stale comment ("5-second timeout") removed since master's rework dropped the `timeout` wrapper.
## Verification
- `cargo fmt --check`, `cargo clippy -- -D warnings`, `cargo test` (2 tests, now `registry::tests::*`) pass
- `slim build mock-vm` → succeeds end-to-end
- `slim run '../../evil'` → rejected, exit 1
- `slim run nonexistent` → proper missing-artifact error
@hulthe please review — will not merge until approved (and after #4).
hulthe
approved these changes 2026-08-26 22:18:19 +02:00
marvin
changed target branch from fix/registry-path-validation to master2026-08-26 22:20:31 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #4 — main.rs (288 lines) was getting cramped, so the functions live in modules now. Stacked on #4; rebase to master once that merges.
Layout
src/main.rs(43 lines) — CLI definition and dispatch onlysrc/registry.rs—validate_image_name,registry_dir+ the unit testssrc/build.rs—mount_image,build_artifacts(podman unshare pipeline, vmlinuz extraction, cpio→gzip initrd)src/qemu.rs—run(direct-kernel-boot launch + exit-status handling)Pure code movement: no behavior change, no new logic. One stale comment ("5-second timeout") removed since master's rework dropped the
timeoutwrapper.Verification
cargo fmt --check,cargo clippy -- -D warnings,cargo test(2 tests, nowregistry::tests::*) passslim build mock-vm→ succeeds end-to-endslim run '../../evil'→ rejected, exit 1slim run nonexistent→ proper missing-artifact error@hulthe please review — will not merge until approved (and after #4).