Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ updates:
target-branch: "main"
labels:
- "kind/dependencies"
- package-ecosystem: "nuget"
directory: "/dotnet"
schedule:
interval: "daily"
time: "03:00"
target-branch: "main"
labels:
- "kind/dependencies"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ $RECYCLE.BIN/
## Hyperlight

**/include/hyperlight*.h
!src/hyperlight_wasm_capi/include/hyperlight_wasm.h
**/include/printf.h
**/native/HyperlightGuest.lib
**/native/HyperlightGuest.pdb
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Prerelease] - Unreleased

### Added

- Added the `hyperlight-wasm-capi` crate, a C API that calls component functions with arguments and results encoded in hyperlight's component wire format.
- Added the `Hyperlight.Wasm` and `Hyperlight.Wasm.Build` .NET packages. They run components from .NET with typed C# bindings generated from WIT at build time. See `dotnet/README.md`.
- Added `SandboxBuilder::with_runtime_file` to load the guest runtime from a file, and `SandboxBuilder::with_interrupt_vcpu_sigrtmin_offset` to change the interrupt signal on Linux.

### Changed

- **BREAKING CHANGE:** Component functions use hyperlight's wire names and little-endian encoding, so hosts and guests built with earlier versions cannot call each other.

### Fixed

- Wasm traps report an error instead of aborting the guest with a general protection fault.

## [v0.15.0] - 2026-08

### Changed
Expand Down
113 changes: 75 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = [ "src/hyperlight_wasm", "src/examples_common", "src/hyperlight_wasm_aot", "src/hyperlight_wasm_runtime", "src/hyperlight_wasm_macro" ]
members = [ "src/hyperlight_wasm", "src/hyperlight_wasm_capi", "src/hyperlight_wasm_bindgen", "src/examples_common", "src/hyperlight_wasm_aot", "src/hyperlight_wasm_runtime", "src/hyperlight_wasm_macro" ]
exclude = [ "src/tests/rust_guests/rust_wasm_samples", "src/tests/rust_guests/component_sample", "src/tests/rust_guests/greeter_sample" ]
resolver = "2"

Expand All @@ -15,9 +15,24 @@ readme = "README.md"
[workspace.dependencies]
hyperlight-common = { version = "0.18.0", default-features = false }
hyperlight-component-macro = "0.18.0"
hyperlight-component-csharp = "0.18.0"
hyperlight-component-util = "0.18.0"
hyperlight-guest = "0.18.0"
hyperlight-guest-bin = "0.18.0"
hyperlight-host = { version = "0.18.0", default-features = false }
hyperlight-wasm-macro = { version = "0.15.0", path = "src/hyperlight_wasm_macro" }
hyperlight-wasm-runtime = { version = "0.15.0", path = "src/hyperlight_wasm_runtime" }

# Unreleased hyperlight with the component wire format and C# bindings.
# Remove once hyperlight releases these changes.
[patch.crates-io]
hyperlight-host = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-common = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-guest = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-guest-bin = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-guest-macro = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-guest-tracing = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-libc = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-component-macro = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-component-util = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
hyperlight-component-csharp = { git = "https://github.com/hyperlight-dev/hyperlight", branch = "component-wire-format" }
16 changes: 16 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@ examples-components target=default-target features="": (build-rust-component-exa
{{ wit-world }} cargo run {{ if features =="" {''} else {"--no-default-features -F kvm -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example component_example
{{ wit-world-c }} cargo run {{ if features =="" {''} else {"--no-default-features -F kvm -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example c-component
{{ wit-world }} {{ wit-world-name-greeter }} cargo run {{ if features =="" {''} else {"--no-default-features -F kvm -F " + features } }} --profile={{ if target == "debug" {"dev"} else { target } }} --example component_greeter_example
{{ wit-world }} cargo test -p hyperlight-wasm-capi --profile={{ if target == "debug" {"dev"} else { target } }} -- --include-ignored

# Builds the native libraries, and a guest runtime and component for the component_sample example world, for the .NET tests
dotnet-test-assets target=default-target: (build-rust-component-examples target)
cargo build -p hyperlight-wasm-capi -p hyperlight-wasm-bindgen --profile={{ if target == "debug" {"dev"} else { target } }}
{{ wit-world }} cargo hyperlight build --profile={{ if target == "debug" {"dev"} else { target } }} --manifest-path src/hyperlight_wasm_runtime/Cargo.toml --target-dir target/component-sample-runtime --locked

# Runs the .NET tests. Needs the .NET 8 SDK or later.
dotnet-test target=default-target: (dotnet-test-assets target)
dotnet test dotnet/tests/Hyperlight.Wasm.Tests -c {{ if target == "debug" {"Debug"} else {"Release"} }}

# Packs the .NET packages for this machine's runtime identifier into dotnet/artifacts
dotnet-pack target="release":
cargo build -p hyperlight-wasm-capi -p hyperlight-wasm-bindgen --profile={{ if target == "debug" {"dev"} else { target } }}
dotnet pack dotnet/src/Hyperlight.Wasm -c {{ if target == "debug" {"Debug"} else {"Release"} }} -o dotnet/artifacts
dotnet pack dotnet/src/Hyperlight.Wasm.Build -c {{ if target == "debug" {"Debug"} else {"Release"} }} -o dotnet/artifacts

# Test a component and a module compiled with pulley
examples-pulley target=default-target features="": (build-pulley-rust-component-examples target features) (build-pulley-rust-wasm-examples target features)
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ WIT_WORLD=</path/to/output.wasm> HYPERLIGHT_COMPONENT_MACRO_DEBUG=/tmp/guest.rs
HYPERLIGHT_COMPONENT_MACRO_DEBUG=/tmp/host.rs cargo build
```

### Other languages

* [`src/hyperlight_wasm_capi`](src/hyperlight_wasm_capi) is a C API. Its header is `include/hyperlight_wasm.h`.
* [`dotnet`](dotnet) has .NET packages with C# bindings generated from WIT.

Both load a guest runtime built for the component's world from a file.


## Code of Conduct

Expand Down
Loading
Loading