feat: add urunc-ready OCI image for helloworld-c#89
Merged
Conversation
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a urunc-compatible OCI image packaging flow for the examples/helloworld-c Unikraft workload, enabling it to be run under Kubernetes/containerd using the urunc unikernel runtime while also syncing the host crate lockfile to the 0.9.0 version bump.
Changes:
- Added
urunc.Dockerfile,urunc.json, andURUNC.mdto package and document a minimal urunc OCI image (kernel + initrd + metadata). - Added a
just urunc-imagerecipe to build the urunc-ready image locally. - Added a
publish-urunc-helloGitHub Actions job to build and publish the image to GHCR; updatedhost/Cargo.lockfor the 0.9.0 bump.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| host/Cargo.lock | Updates the lockfile entry to reflect hyperlight-unikraft-host version 0.9.0. |
| examples/helloworld-c/URUNC.md | Adds end-user documentation for building/importing/running the image with urunc + containerd. |
| examples/helloworld-c/urunc.json | Adds urunc metadata file (base64-encoded values) for runtimes that don’t propagate annotations. |
| examples/helloworld-c/urunc.Dockerfile | Adds the OCI image build (scratch image containing kernel + initrd + metadata). |
| examples/helloworld-c/Justfile | Adds urunc-image target to build the urunc image locally. |
| .github/workflows/publish-examples.yml | Adds CI job to build and publish the urunc-ready image to GHCR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+190
to
+195
| - name: Install kraft-hyperlight | ||
| if: steps.kraft-cache.outputs.cache-hit != 'true' | ||
| run: | | ||
| git clone --branch hyperlight-platform --depth 1 https://github.com/danbugs/kraftkit.git /tmp/kraftkit | ||
| cd /tmp/kraftkit && go build -o /usr/local/bin/kraft-hyperlight ./cmd/kraft | ||
|
|
Comment on lines
+8
to
+11
| FROM scratch | ||
| COPY .unikraft/build/helloworld-hyperlight_hyperlight-x86_64 /unikernel/kernel | ||
| COPY --from=build /output.cpio /unikernel/initrd.cpio | ||
| COPY urunc.json /urunc.json |
| - `/unikernel/initrd.cpio` — CPIO archive containing `/bin/hello` (static-PIE C binary) | ||
| - `/urunc.json` — urunc annotations identifying this as a `hyperlight` + `unikraft` workload | ||
|
|
||
| When urunc runs the image, it finds `hyperlight-unikraft` on the host, bind-mounts it along with `/dev/kvm` into an isolated rootfs, and exec's: |
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: 66143d4 | Previous: 05c79a7 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
90 ms |
110 ms |
0.82 |
density (per VM) |
11 MB |
11 MB |
1 |
snapshot (disk) |
656 MiB |
656 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: 66143d4 | Previous: 05c79a7 | Ratio |
|---|---|---|---|
hello_world (median) |
343 ms |
310 ms |
1.11 |
pandas (median) |
1039 ms |
832 ms |
1.25 |
density (per VM) |
656 MB |
656 MB |
1 |
snapshot (disk) |
664 MiB |
664 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
This was referenced Jun 3, 2026
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.
Add a urunc-compatible OCI image for the helloworld-c example, enabling hyperlight-unikraft workloads to run on Kubernetes via urunc (CNCF unikernel container runtime).
urunc treats
hyperlight-unikraftas a host-level VMM (like QEMU), with the OCI image carrying the Unikraft kernel + initrd payload. This follows the same pattern ashello-qemu-unikraftandhello-firecracker-unikraftin the urunc ecosystem.urunc.Dockerfile,urunc.json, andURUNC.mdtoexamples/helloworld-c/just urunc-imagerecipe for local buildspublish-urunc-helloCI job to publish to GHCRCargo.lockwith 0.9.0 version bumpRelated: urunc-dev/urunc#140, urunc-dev/urunc#632