Forward restorer build configuration when constructing a sandbox from a snapshot
維護者通常 7 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with hyperlight_js::SandboxBuilder::build_from_snapshot() and ProtoJSSandbox::from_snapshot(), then check the upstream API tracked by hyperlight-dev/hyperlight#1862. Confirm that the existing SandboxConfiguration reaches the upstream snapshot builder while snapshot-owned geometry and separately handled callbacks remain unchanged; done when restored sandboxes retain the supported construction settings.
由索引模型根據 Issue 內容生成。
描述
Blocked by: https://github.com/hyperlight-dev/hyperlight/issues/1862
Problem
hyperlight_js::SandboxBuilder stores Hyperlight construction settings in a SandboxConfiguration.
For a fresh sandbox, build() forwards that complete configuration to Hyperlight:
ProtoJSSandbox::new(
guest_binary,
Some(self.config),
self.host_print_fn,
)
The persistent snapshot path does not:
pub fn build_from_snapshot(
self,
snapshot: Snapshot,
) -> Result<ProtoJSSandbox> {
ProtoJSSandbox::from_snapshot(
snapshot,
self.host_print_fn,
)
}
self.config is discarded.
ProtoJSSandbox::from_snapshot() creates a private hyperlight_host::SandboxBuilder::from_snapshot() using Hyperlight defaults. The eventual MultiUseSandbox is not created until restore_js_sandbox() or restore_loaded_sandbox(), but ProtoJSSandbox does not expose configuration methods for the private upstream builder.
Consequently, callers have no opportunity to reapply immutable construction settings before restoration completes.
Affected settings, where supported by the target and enabled features, include:
- VCPU interrupt signal offset
- Interrupt retry delay
- Per-sandbox crashdump enablement
- GDB configuration
After the restored MultiUseSandbox has been created, these settings cannot be changed.
Host print callbacks are not affected because they are stored and forwarded separately. Host functions are also re-registered before the upstream snapshot builder is built.
Heap, scratch, and transport geometry are snapshot-owned and should continue to come from the snapshot.
Proposed change
After the upstream API in hyperlight-dev/hyperlight#1862 is available, forward the existing configuration through the snapshot construction path:
pub fn build_from_snapshot(
self,
snapshot: Snapshot,
) -> Result<ProtoJSSandbox> {
ProtoJSSandbox::from_snapshot(
snapshot,
self.config,
self.host_print_fn,
)
}
ProtoJSSandbox::from_snapshot() should apply it to the upstream builder:
let mut builder =
HyperlightSandboxBuilder::from_snapshot(snapshot.inner())
.sandbox_configuration(config);
- 主要語言
- Rust
- 星號
- 16
- 分支
- 5
- 平均合併
- 7 天 3 小時
- 30 天內合併 PR
- 28
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hyperlight-dev/hyperlight-js 的其他 Issue
-
lifecycle/needs-review
難度 2/5 1-3 小時 新手友好度 68/100
hyperlight-dev/hyperlight-js#81 ·
維護者通常 7 天內回覆
-
lifecycle/needs-review
難度 4/5 3-5 天 新手友好度 48/100
hyperlight-dev/hyperlight-js#340 ·
維護者通常 7 天內回覆
-
lifecycle/needs-review
難度 5/5 一週以上 新手友好度 35/100
hyperlight-dev/hyperlight-js#339 ·
維護者通常 7 天內回覆
-
lifecycle/needs-review
難度 4/5 3-5 天 新手友好度 52/100
hyperlight-dev/hyperlight-js#338 ·
維護者通常 7 天內回覆
-
lifecycle/needs-review
難度 5/5 一週以上 新手友好度 35/100
hyperlight-dev/hyperlight-js#312 ·
維護者通常 7 天內回覆
查看 hyperlight-dev/hyperlight-js 的全部 Issue
相似的 Issue
-
area:desktop priority:p2 type:bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
fritzprix/libr-agent#2165 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 69/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
-
area:ecosystem bug
難度 2/5 1-3 小時 新手友好度 75/100
Chelis-Lang/chelis#3942 ·
維護者通常 1 天內回覆