Problem
cargo hyperlight new generates projects that cannot build on a native Windows ARM64 host.
The current template has two x64-era assumptions in src/new/mod.rs:
HYPERLIGHT_VERSION is 0.15. Its hyperlight-libc rejects the automatically selected aarch64 target with Unsupported target architecture: aarch64.
GUEST_ARCH is always x86_64, so the generated host loads target/x86_64-hyperlight-none/... even when cargo hyperlight build selects aarch64-hyperlight-none from the native host architecture.
This is still present on main at cargo-hyperlight 0.1.13.
Reproduction
On native Windows ARM64:
cargo hyperlight new chw
cd chw/guest
cargo hyperlight build
The build selects AArch64 automatically, then fails in Hyperlight 0.15:
Unsupported target architecture: aarch64
Hardware validation
I changed the generated guest and host dependencies to the Hyperlight 0.16 ARM64 WHP PR and changed the guest path to aarch64-hyperlight-none.
The generated sample then passed end to end on a Surface Laptop 7 with WHP:
- Debug guest build and execution.
- Release guest build and execution.
- Host callback and typed guest calls.
- Persistent guest state.
- Snapshot and restore.
- 10 release runs with surrogate mappings.
- 10 release runs with
HYPERLIGHT_MAX_SURROGATES=0.
Expected output was produced on every run.
Suggested direction
Generate the dependency version and guest architecture from supported/current values instead of fixed 0.15 and x86_64. The build command already defaults its target from std::env::consts::ARCH, so the scaffold should use the same architecture decision.
Problem
cargo hyperlight newgenerates projects that cannot build on a native Windows ARM64 host.The current template has two x64-era assumptions in
src/new/mod.rs:HYPERLIGHT_VERSIONis0.15. Itshyperlight-libcrejects the automatically selectedaarch64target withUnsupported target architecture: aarch64.GUEST_ARCHis alwaysx86_64, so the generated host loadstarget/x86_64-hyperlight-none/...even whencargo hyperlight buildselectsaarch64-hyperlight-nonefrom the native host architecture.This is still present on main at cargo-hyperlight 0.1.13.
Reproduction
On native Windows ARM64:
The build selects AArch64 automatically, then fails in Hyperlight 0.15:
Hardware validation
I changed the generated guest and host dependencies to the Hyperlight 0.16 ARM64 WHP PR and changed the guest path to
aarch64-hyperlight-none.The generated sample then passed end to end on a Surface Laptop 7 with WHP:
HYPERLIGHT_MAX_SURROGATES=0.Expected output was produced on every run.
Suggested direction
Generate the dependency version and guest architecture from supported/current values instead of fixed
0.15andx86_64. The build command already defaults its target fromstd::env::consts::ARCH, so the scaffold should use the same architecture decision.