Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Forward restorer build configuration when constructing a sandbox from a snapshot

Aberta
#337 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 7 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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);
Linguagem predominante
Rust
Estrelas
16
Forks
5
Merge médio
7d 3h
PRs com merge (30d)
28

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de hyperlight-dev/hyperlight-js

Todas as issues de hyperlight-dev/hyperlight-js

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.