Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Forward restorer build configuration when constructing a sandbox from a snapshot

Offen
#337 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 7 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

lifecycle/needs-review

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);
Vorherrschende Sprache
Rust
Sterne
15
Forks
5
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
25

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus hyperlight-dev/hyperlight-js

Alle Issues in hyperlight-dev/hyperlight-js

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.