Skip to content

Add wasm packages for .net sdk#68

Merged
jsturtevant merged 2 commits intomainfrom
dotnet-wasm-packages
May 1, 2026
Merged

Add wasm packages for .net sdk#68
jsturtevant merged 2 commits intomainfrom
dotnet-wasm-packages

Conversation

@jsturtevant
Copy link
Copy Markdown
Contributor

This makes it easy to consume the wasm guests. Follows same pattern as Python SDK

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class .NET NuGet packages that bundle the prebuilt Wasm/AOT guest modules (Python + JavaScript), matching the “batteries-included guest” consumption pattern used by other SDKs, and updates the .NET examples/docs to use these packages.

Changes:

  • Introduces Hyperlight.HyperlightSandbox.Guest.Python and Hyperlight.HyperlightSandbox.Guest.JavaScript packages with WithPythonModule() / WithJavaScriptModule() builder helpers.
  • Updates .NET examples and docs to use bundled guest modules instead of manually providing .aot paths.
  • Updates the .NET Justfile to build guest artifacts before running examples and packing NuGet packages.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/wasm_sandbox/guests/javascript/package-lock.json Updates JS guest lockfile as part of guest build tooling dependencies.
src/sdk/dotnet/core/Tests/HyperlightSandbox.PackageTests/PackageInstallationTests.cs Adds tests asserting guest NuGet packages materialize modules and configure SandboxBuilder.
src/sdk/dotnet/core/Tests/HyperlightSandbox.PackageTests/HyperlightSandbox.PackageTests.csproj Adds package references for the new guest module packages.
src/sdk/dotnet/core/HyperlightSandbox.sln Includes the new Guest.Python and Guest.JavaScript projects in the solution.
src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs Adds helper to locate bundled Python guest .aot and configure the builder.
src/sdk/dotnet/core/Guest.Python/HyperlightSandbox.Guest.Python.csproj Creates NuGet package project bundling python-sandbox.aot under RID runtime assets.
src/sdk/dotnet/core/Guest.JavaScript/JavaScriptGuestModule.cs Adds helper to locate bundled JS guest .aot and configure the builder.
src/sdk/dotnet/core/Guest.JavaScript/HyperlightSandbox.Guest.JavaScript.csproj Creates NuGet package project bundling js-sandbox.aot under RID runtime assets.
src/sdk/dotnet/core/Examples/ToolRegistrationExample/ToolRegistrationExample.csproj Switches example dependency from Common helper to Guest.Python project.
src/sdk/dotnet/core/Examples/ToolRegistrationExample/Program.cs Uses WithPythonModule() instead of manual module path lookup.
src/sdk/dotnet/core/Examples/SnapshotExample/SnapshotExample.csproj Switches example dependency from Common helper to Guest.Python project.
src/sdk/dotnet/core/Examples/SnapshotExample/Program.cs Uses WithPythonModule() instead of manual module path lookup.
src/sdk/dotnet/core/Examples/NetworkExample/Program.cs Uses WithPythonModule() instead of manual module path lookup.
src/sdk/dotnet/core/Examples/NetworkExample/NetworkExample.csproj Switches example dependency from Common helper to Guest.Python project.
src/sdk/dotnet/core/Examples/FilesystemExample/Program.cs Uses WithPythonModule() instead of manual module path lookup.
src/sdk/dotnet/core/Examples/FilesystemExample/FilesystemExample.csproj Switches example dependency from Common helper to Guest.Python project.
src/sdk/dotnet/core/Examples/BasicExample/Program.cs Uses WithPythonModule() and updates prerequisites comment.
src/sdk/dotnet/core/Examples/BasicExample/BasicExample.csproj Switches example dependency from Common helper to Guest.Python project.
src/sdk/dotnet/README.md Documents the new guest module packages and builder helpers.
src/sdk/dotnet/Justfile Adds build-guests and wires it into examples and dist.
RELEASE.md Notes .NET versioning source (Directory.Build.props).
Files not reviewed (1)
  • src/wasm_sandbox/guests/javascript/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

src/wasm_sandbox/guests/javascript/package-lock.json:229

  • package-lock.json still references @emnapi/core / @emnapi/runtime (e.g., as peer dependencies of @napi-rs/wasm-runtime), but their node_modules/@emnapi/* entries were removed from the lockfile. This will likely break npm ci / reproducible installs. Regenerate the lockfile with npm install (or ensure the @emnapi/* packages are fully removed from the dependency graph) so the lock includes consistent resolved + integrity metadata.

Comment thread src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs
Comment thread src/sdk/dotnet/README.md Outdated
Comment thread src/sdk/dotnet/core/Guest.JavaScript/JavaScriptGuestModule.cs
Comment thread src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs Outdated
Comment thread src/sdk/dotnet/core/Examples/BasicExample/Program.cs
Comment thread src/sdk/dotnet/core/Guest.JavaScript/JavaScriptGuestModule.cs Outdated
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
@jsturtevant jsturtevant merged commit 3c59041 into main May 1, 2026
28 checks passed
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