Allow snapshot-backed `SandboxBuilder` to accept a complete `SandboxConfiguration`

Aberta
#1,862 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
api, infrastructure

Direção de pesquisa

Start at hyperlight_host::SandboxBuilder::from_snapshot() and the existing SandboxConfiguration handling for fresh sandboxes. Trace which snapshot-owned structural values and restorer-owned settings are applied, then add the proposed configuration input without changing restore semantics. Done means interrupt, crashdump, GDB, and other available non-structural settings come from the supplied configuration.

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

Descrição

S-needs-triage
Problem

Hyperlight-JS stores construction settings in a SandboxConfiguration. Its fresh-sandbox path forwards that configuration to Hyperlight, but its snapshot restoration path discards it and creates a hyperlight_host::SandboxBuilder::from_snapshot() using Hyperlight defaults.

This loses any configured non-structural construction settings available for the current platform and feature set, including interrupt configuration, per-sandbox crashdump enablement, and GDB configuration. These settings cannot be changed after the restored MultiUseSandbox is built.

Hyperlight's snapshot builder exposes per-field methods for these values, so Hyperlight-JS could separately retain and replay every setting. However, that would duplicate Hyperlight's configuration state, require wrapper changes whenever settings are added, and cannot reconstruct fields whose SandboxConfiguration getters are not public.

The snapshot builder should therefore accept a complete SandboxConfiguration. Hyperlight's existing low-level restore semantics should remain unchanged: snapshot-owned heap, scratch, and transport geometry override caller values, while non-structural construction settings come from the restoring host.

Proposed API
let sandbox = SandboxBuilder::from_snapshot(snapshot)
    .sandbox_configuration(config)
    .build()?;

Snapshot-owned structural values are still applied. Other restorer-owned settings should come from the supplied configuration.

Maybe we should split the configuration into 2 different structs to make this cleaner

Linguagem predominante
Rust
Estrelas
4.8k
Forks
223
Merge médio
1d 18h
PRs com merge (30d)
65

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

Todas as issues de hyperlight-dev/hyperlight

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.