Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Allow precise host-function requirements for snapshot/restore

未關閉
#338 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 7 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
52/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, rust
領域
backend

研究方向

Start by locating the handler and module registration APIs, then trace how snapshot and restore state tracks available and required host functions. Define the optional per-item requirement declarations and verify that omitted declarations retain conservative promotion while removals recompute the union of declared requirements.

由索引模型根據 Issue 內容生成。

描述

lifecycle/needs-review
Problem

Hyperlight-JS snapshots distinguish:

  • available: callbacks installed in the destination host
  • required: callbacks exposed to the current guest state and recorded in snapshots

Consider:

  1. Snapshot requires function A.
  2. Destination provides A and B.
  3. Restore preserves required = {A} and available = {A, B}.
  4. A new handler that calls B is staged.
  5. The next snapshot must require both A and B.

Hyperlight-JS cannot reliably infer host-function dependencies from arbitrary
JavaScript. Imports and property access can be dynamic, and runtime observation
would miss unexecuted branches.

The current safe behavior conservatively promotes required to the complete
available manifest whenever a handler or module is added after restoration.
This is correct but can overstate requirements and reduce snapshot portability.

Proposed solution

Add an optional API for declaring host-function requirements when registering
handlers and modules. Track requirements per registered item so removals can
recompute the resulting union.

Callers that omit declarations retain the conservative promotion behavior.

主要語言
Rust
星號
15
分支
5
平均合併
7 天 3 小時
30 天內合併 PR
28

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

hyperlight-dev/hyperlight-js 的其他 Issue

查看 hyperlight-dev/hyperlight-js 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。