Skip to content

Update Hyperlight to 0.18, hyperlight-js 0.5 and hyperlight-wasm 0.16 - #46

Merged
ludfjig merged 1 commit into
mainfrom
hyperlight-0.18
Nov 11, 2026
Merged

ludfjig merged 1 commit into
mainfrom
hyperlight-0.18

Conversation

@ludfjig

@ludfjig ludfjig commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Update Hyperlight to 0.18.0, hyperlight-js to 0.5.0 and hyperlight-wasm to 0.16.0.

  • hyperlight-js 0.5.0 and hyperlight-wasm 0.16.0 require Hyperlight 0.18, so 0.19.0 waits for their next releases.
  • Pin Wasmtime 36.0.18 and Cranelift 0.123.18 to match hyperlight-wasm-aot 0.16.0, which compiles the AOT artifacts.
  • Use typed hyperlight-wasm snapshots and the new Sandbox name.
  • Reduce the dummy guest to its #[guest_function] handler. 0.18 provides defaults for the entry points it defined.

ludfjig added a commit that referenced this pull request Nov 10, 2026
`actions/deploy-pages` uses `GITHUB_SHA` as the Pages build version.
Pages runs on `main`, so every deploy between merges reuses one version,
and the status check reports success right away. On #46, a deploy
reported success but Pages kept serving the previous site, so the
preview stayed stale with a green job.

* Assemble adds marker files at a path unique to the run attempt.
* After deploying, the job polls a different marker every 10 seconds and
fails after 5 minutes. Fresh paths avoid 404s cached by the CDN, which
ignores query strings.

The check only runs from `main`, so it gets exercised after merge.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
ludfjig added a commit that referenced this pull request Nov 10, 2026
The build cache key included a hash of `tool-versions.sh`, and
rust-cache only falls back across `Cargo.lock` changes. Bumping any tool
discarded the whole cache, so #46 rebuilt every tool and crate from
scratch.

* Tool binaries use a separate cache keyed by `tool-versions.sh`, with a
fallback to older tool sets. `setup-tools.sh` reinstalls only tools
whose versions differ.
* The build cache key keeps only the `cargo-hyperlight` version, since
that tool builds the dummy guest into a cached target directory.

Every cache misses once after merge because the keys change.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
hyperlight-js 0.5.0 and hyperlight-wasm 0.16.0 require hyperlight-host 0.18, so the host and guest crates move to 0.18.0, not 0.19.0.

hyperlight-wasm-aot 0.16.0 locks Wasmtime 36.0.18 and Cranelift 0.123.18. The server pins the same versions so it can load the AOT artifacts.

hyperlight-wasm 0.16 snapshots are typed, so the Wasm handler keeps a Snapshot<LoadedWasmSandbox>. The dummy handler uses Sandbox, the new name for MultiUseSandbox.

The dummy guest keeps only its #[guest_function] handler. In 0.18 guest_dispatch_function returns Result<ReturnValue>, and its default returns the same GuestFunctionNotFound error. hyperlight_main has a no-op default, and srand is only needed with the libc feature, which the guest disables.

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig
ludfjig merged commit 5691d60 into main Nov 11, 2026
243 of 282 checks passed
ludfjig added a commit to hyperlight-dev/hyperlight-js that referenced this pull request Nov 12, 2026
`get_loaded_sandbox` and `unload` each called `RegisterHostModules`,
although the base snapshot already holds that registration. A
load/unload cycle made four guest calls, but only `register_handler` and
`RunHandler` are needed. In hyperlight-dev/hyperlight-bench#46,
`kvm-hyperlight-js-reload` lost 15% throughput against 0.4.0.

This change registers host functions only when a restored snapshot
records different ones than the builder supplies. It then takes a new
base snapshot, so later cycles skip registration.

`full_lifecycle/add_load_handle_unload`:

| | main | this PR |
|---|---|---|
| MSHV | 415 µs | 315 µs |
| KVM | 248 µs | 203 µs |

KVM stays about 10% slower than 0.4.0 because each guest call costs more
in Hyperlight 0.18.

Breaking: the snapshot metadata schema is now 2. Snapshots from 0.5.0
can record host functions their base never registered, so they are
rejected and must be recreated.

---------

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
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.

1 participant