Update dependencies to hyperlight-js released version#228
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates HyperAgent’s Hyperlight integration to use released (non-fork) versions of Hyperlight / hyperlight-js, aligning the Node host addon, the custom Hyperlight guest runtime, and the analysis guest with the upstream-published dependency set.
Changes:
- Switch Node-side host API usage from
@hyperlight/js-host-apito@hyperlight-dev/js-host-apiacross runtime loading, scripts, and packaging. - Move Rust dependencies from git forks/branches to published crates (notably
hyperlight-js-runtime = 0.3.3,hyperlight-* = 0.16.0) and bumprquickjsto0.12. - Update guest runtime plumbing (picolibc/sysroot assumptions,
clock_gettimewrapping for deterministic time) and adjust build/CI automation to use a pinned hyperlight-js release-tag checkout.
Reviewed changes
Copilot reviewed 24 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/sandbox/tool.js | Update host API require target to the new @hyperlight-dev scope. |
| src/sandbox/runtime/Cargo.toml | Use published hyperlight-js-runtime and bump rquickjs to 0.12 in the custom runtime. |
| src/sandbox/runtime/Cargo.lock | Lockfile refresh reflecting the new published Hyperlight and rquickjs dependency graph. |
| src/sandbox/runtime/modules/native-markdown/Cargo.toml | Bump rquickjs to 0.12 for the native module crate. |
| src/sandbox/runtime/modules/native-image/Cargo.toml | Bump rquickjs to 0.12 for the native module crate. |
| src/sandbox/runtime/modules/native-html/Cargo.toml | Bump rquickjs to 0.12 for the native module crate. |
| src/sandbox/runtime/modules/native-globals/Cargo.toml | Bump rquickjs to 0.12 for the native module crate. |
| src/sandbox/runtime/modules/native-deflate/Cargo.toml | Bump rquickjs to 0.12 for the native module crate. |
| src/code-validator/guest/runtime/src/main/stubs/mod.rs | Update analysis-guest stub module organization and documentation. |
| src/code-validator/guest/runtime/src/main/stubs/localtime.rs | Remove localtime stub now that sysroot/picolibc provides it. |
| src/code-validator/guest/runtime/src/main/stubs/io.rs | Remove putchar/fflush stubs now that sysroot/picolibc provides stdio. |
| src/code-validator/guest/runtime/src/main/stubs/clock.rs | Provide deterministic time via -wrap=clock_gettime and a wrapper implementation. |
| src/code-validator/guest/runtime/include/stdio.h | Convert to a passthrough header relying on sysroot stdio rather than local macros. |
| src/code-validator/guest/runtime/build.rs | Add conditional linker wrap flag for clock_gettime in hyperlight builds. |
| src/code-validator/guest/host/Cargo.toml | Bump cargo-hyperlight build dependency to 0.1.12. |
| src/code-validator/guest/host/build.rs | Adjust CFLAGS and target-dir handling for newer cargo-hyperlight behavior. |
| src/code-validator/guest/Cargo.toml | Switch Hyperlight workspace deps to published 0.16.0 crates aligned to hyperlight-js 0.3.x. |
| src/code-validator/guest/Cargo.lock | Lockfile refresh reflecting published Hyperlight crates and transitive updates. |
| src/agent/index.ts | Update runtime loading check to require the new @hyperlight-dev host API package. |
| scripts/extract-hyperlight-builtins.ts | Update comments to reflect non-git-checkout resolution via cargo metadata. |
| scripts/check-native-runtime.js | Update node_modules path to the @hyperlight-dev scope. |
| scripts/build-binary.js | Update externals and runtime module-resolution patch for the new package name/scope. |
| package.json | Switch dependency from @hyperlight/js-host-api to @hyperlight-dev/js-host-api (file: dep). |
| package-lock.json | Lockfile update to reflect new package scope/name and updated transitive deps. |
| Justfile | Replace “cargo git checkout discovery” with “pinned hyperlight-js release tag checkout” flow and updated build prerequisites. |
| .github/workflows/publish.yml | Update musl rebuild step to build from deps/js-host-api symlink created during setup. |
| .github/dependabot.yml | Update ignored dependency name to the new @hyperlight-dev scope. |
Move off the simongdavies/* fork+branch git deps onto published release artifacts (no forks/branches): - hyperlight-js-runtime -> 0.3.3 (crates.io); core hyperlight-* -> 0.16.0; cargo-hyperlight -> 0.1.12 (rquickjs already 0.12 on this base) - npm addon @hyperlight/js-host-api -> @hyperlight-dev/js-host-api, built from the v0.3.3 release tag (file:deps/js-host-api) so the custom runtime (native modules ha:ziplib/image/html/markdown) stays embedded; the published npm addon ships only the default runtime - Justfile: build the addon from a v0.3.3 release-tag checkout (ensure-hyperlight-src) instead of Cargo's git checkout; source CFLAGS and picolibc stub headers from it - code-validator guest: musl -> picolibc port (0.16.0 is picolibc) - wrap clock_gettime + gettimeofday via -wrap link flags, stdio.h passthrough, drop obsolete io.rs/localtime.rs stubs picolibc now provides - scripts/CI: publish.yml musl step, check-native-runtime.js scope, extract-hyperlight-builtins.ts, dependabot.yml - regenerate package-lock.json (drops stale git-checkout scope entry) - builtin-modules/bash.json: incidental sourceHash regen (was stale on base) Validated: just build + just lint-all green; just test 2505/2505; just test-analysis-guest 124 pass / 7 ignored / 0 fail. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
db5be29 to
67559bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
now based on released/non-forked versions of hyperligth and hyperlight-js