Skip to content

Rebase hyperlight dep onto upstream main#98

Closed
danbugs wants to merge 1 commit into
mainfrom
chore/rebase-hyperlight-dep
Closed

Rebase hyperlight dep onto upstream main#98
danbugs wants to merge 1 commit into
mainfrom
chore/rebase-hyperlight-dep

Conversation

@danbugs

@danbugs danbugs commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switch hyperlight-host dependency from danbugs/hyperlight (pinned rev on stale fork) to hyperlight-dev/hyperlight branch hyperlight-unikraft, which is rebased on current upstream main
  • Adapt map_file_cow calls to the new upstream 2-arg signature (label parameter was removed)
  • The hyperlight-unikraft branch in hyperlight core carries the non-upstreamed features this repo needs: whp-no-surrogate mode, restore_preserving_file_mappings, and the snapshot file format (to_file/from_file for pyhl)

Test plan

  • cargo fmt --check passes
  • cargo clippy -D warnings passes
  • cargo test --all-targets — 3/3 tests pass
  • helloworld-c example runs (including 10x snapshot/restore)
  • pyhl setup creates snapshot successfully
  • pyhl run loads snapshot and executes Python (numpy import verified)

Copilot AI review requested due to automatic review settings June 22, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the hyperlight-host dependency to a rebased upstream branch (hyperlight-dev/hyperlight hyperlight-unikraft) and adjusts host code to match the updated upstream API, keeping this repository aligned with current Hyperlight main while retaining required non-upstream features.

Changes:

  • Switched hyperlight-host dependency from a pinned commit on a fork to the hyperlight-dev/hyperlight hyperlight-unikraft branch.
  • Updated map_file_cow call sites to the new 2-argument signature (label removed).
  • Refreshed Cargo.lock to reflect the rebased dependency graph (including updated transitive crate versions).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
host/src/lib.rs Updates map_file_cow usage to match upstream API changes.
host/Cargo.toml Points hyperlight-host at the rebased upstream hyperlight-unikraft branch.
host/Cargo.lock Updates locked git source and transitive dependency versions from the rebase.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread host/Cargo.toml Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux Benchmarks

Details
Benchmark suite Current: 62b54cd Previous: 4460ae2 Ratio
hello_world (median) 20 ms 20 ms 1
pandas (median) 110 ms 110 ms 1
density (per VM) 8 MB 11 MB 0.73
snapshot (disk) 653 MiB 656 MiB 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows Benchmarks

Details
Benchmark suite Current: 62b54cd Previous: 4460ae2 Ratio
hello_world (median) 145 ms 301 ms 0.48
pandas (median) 418 ms 768 ms 0.54
density (per VM) 328 MB 656 MB 0.50
snapshot (disk) 654 MiB 664 MiB 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@danbugs danbugs force-pushed the chore/rebase-hyperlight-dep branch 4 times, most recently from f5ede83 to 21b8caa Compare June 24, 2026 13:07
- Point hyperlight-host at danbugs/hyperlight hyperlight-unikraft
  branch (upstream main + whp-no-surrogate + zero-page dedup)
- Adapt snapshot persistence to upstream OCI format (directory-based)
- Re-map initrd via map_file_cow after every restore() since file
  mappings are separate hypervisor memory regions not in the snapshot
- Reduce pyhl heap from 2560 MiB to 1280 MiB (minimum for Python
  warmup with pandas+docx); combined with zero-page dedup this
  shrinks snapshots from ~3 GiB to ~654 MiB
- Remove sparsify_snapshot code (was file-format specific)
- Remove memmap2 and extra windows-sys features (no longer needed)
- Update snapshot path references from file to directory in CI, tests,
  and examples

Signed-off-by: danbugs <danilochiarlone@gmail.com>
@danbugs danbugs force-pushed the chore/rebase-hyperlight-dep branch from 21b8caa to 62b54cd Compare June 24, 2026 14:28
@danbugs

danbugs commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the runtime approach in hyperlight-dev/hyperlight#1578

@danbugs danbugs closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants