cargo hyperlight new generates an unusable project on Windows ARM64
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 冷清
- 技術堆疊
- rust
- 領域
- build-system, cli
研究方向
從 src/new/mod.rs 開始,將產生的相依性版本和 guest 路徑與 cargo hyperlight build 已使用的架構選擇進行比較。在原生 Windows ARM64 上使用 cargo hyperlight new 重現此問題,然後確認產生的專案是否能針對選取的架構進行建置和執行。
由索引模型根據 Issue 內容生成。
描述
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_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:
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.
- 主要語言
- Rust
- 星號
- 4
- 分支
- 6
- 平均合併
- 4 分鐘
- 30 天內合併 PR
- 2
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hyperlight-dev/cargo-hyperlight 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
hyperlight-dev/cargo-hyperlight#99 ·
維護者通常 1 天內回覆
查看 hyperlight-dev/cargo-hyperlight 的全部 Issue
相似的 Issue
-
bug P2: medium
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
-
tests
難度 2/5 1-3 小時 新手友好度 70/100
vfarcic/dot-agent-deck#2512 ·
維護者通常 1 天內回覆