Skip to content

Replace prebuilt custom runtime overrides with manifest-based cargo-hyperlight builds - #295

Draft
simongdavies wants to merge 7 commits into
mainfrom
simongdavies-custom-guest-builds
Draft

Replace prebuilt custom runtime overrides with manifest-based cargo-hyperlight builds#295
simongdavies wants to merge 7 commits into
mainfrom
simongdavies-custom-guest-builds

Conversation

@simongdavies

@simongdavies simongdavies commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

Build and embed a custom guest as part of the host build by setting HYPERLIGHT_JS_RUNTIME_MANIFEST_PATH to its Cargo.toml. The Rust and Node.js host APIs remain unchanged.

  • Remove the need for a fragile command to populate an environment variable before building the custom guest runtime.
  • Remove the separate custom-runtime build step: the host build takes care of this now.
  • Remove the obsolete stub-header include path.
  • Simplify the native-module test recipe and add build-selection and custom guest globals/clock coverage.
  • Keep build-selection helpers in a shared module with colocated tests, without importing the build script or suppressing unused-code warnings.
  • Scope the assertion lint to release library builds, allowing assertions in test and tool targets without per-file exceptions.
  • Update the extension guide with the manifest-based workflow.

Breaking change / release notes

Prebuilt custom guest embedding through HYPERLIGHT_JS_RUNTIME_PATH has been removed. The variable is no longer read or tracked, and there is no compatibility check or migration error.

Set HYPERLIGHT_JS_RUNTIME_MANIFEST_PATH to the custom runtime crate's absolute Cargo.toml path and rebuild the host or Node.js addon from source. The runtime manifest must define exactly one binary target; the host build builds it with cargo-hyperlight and embeds it automatically.

Without a custom manifest, the default runtime is built and embedded, even if the old variable is still set. Published Node.js addon binaries still contain the default runtime and must be replaced with a locally rebuilt addon to use custom modules.

This PR is labelled breaking-change for the generated release notes.

Build and embed custom runtimes from their Cargo manifests, keeping compiler configuration in the host build script. Remove the prebuilt runtime override and simplify the consumer documentation and test recipes.

BREAKING CHANGE: HYPERLIGHT_JS_RUNTIME_PATH is no longer supported. Use HYPERLIGHT_JS_RUNTIME_MANIFEST_PATH to select a custom runtime crate.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies added the kind/enhancement New feature or improvement label Sep 8, 2026
simongdavies and others added 4 commits September 8, 2026 14:22
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
…brary

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies added the breaking-change Breaking change requiring consumer migration label Sep 9, 2026
@simongdavies simongdavies changed the title Simplify custom runtime builds with cargo-hyperlight Replace prebuilt custom runtime overrides with manifest-based cargo-hyperlight builds Sep 9, 2026
simongdavies and others added 2 commits September 9, 2026 10:40
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Use cargo rustc for custom guests so the clock wrapper flag is not inherited by cargo-hyperlight's native sysroot wrapper build.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change requiring consumer migration kind/enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant