Skip to content

Add bincompat-go-http - #101

Open
Criss-Ivana wants to merge 2 commits into
unikraft:mainfrom
Criss-Ivana:feat/bincompat-go-http
Open

Add bincompat-go-http#101
Criss-Ivana wants to merge 2 commits into
unikraft:mainfrom
Criss-Ivana:feat/bincompat-go-http

Conversation

@Criss-Ivana

Copy link
Copy Markdown

This PR ports the go-httpbin 2.13.4 from catalog into catalog-core.

@Criss-Ivana
Criss-Ivana marked this pull request as ready for review May 9, 2026 14:07
@Criss-Ivana
Criss-Ivana force-pushed the feat/bincompat-go-http branch 3 times, most recently from d6f3654 to dc1355a Compare May 16, 2026 07:16
@Criss-Ivana

Copy link
Copy Markdown
Author

Commit history was squashed to a single commit. Earlier force-pushes were from amending locally and me constantly changing my mind on what the best commit message is. :)

@razvand
razvand self-requested a review May 16, 2026 14:21
@razvand razvand self-assigned this May 16, 2026
@razvand razvand added the enhancement New feature or request label May 16, 2026

@razvand razvand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make the commit message wrap to 72 lines. Use "instructions" instead of "instructis" in the commit message.

If the application is httpbingo, name the directory accordingly: bincompat-go-httpbingo.

Use a proper name for authorship and for signed-off-by. Use Firstname Lastname <email>. Do not use Criss-Ivana.

Copy-pasting the commands doesn't work:

./setup.sh
make -C rootfs clean
make -C rootfs
./workdir/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/
make

sudo ip link set dev virbr0 down || true
sudo ip link del dev virbr0 || true
sudo ip link add dev virbr0 type bridge
sudo ip address add 172.44.0.1/24 dev virbr0
sudo ip link set dev virbr0 up

sudo qemu-system-x86_64 \
    -nographic \
    -enable-kvm \
    -m 256 \
    -cpu host \
    -netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \
    -append "elfloader_qemu-x86_64 netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /go-httpbin" \
    -kernel workdir/build/elfloader_qemu-x86_64 \
    -initrd ./initrd.cpio

Follow the instructions and example from the bincompat-c-hello/ directory. See the README, scripts and other files.

Comment thread bincompat-go-http/rootfs/Dockerfile Outdated
Comment thread bincompat-go-http/.gitignore Outdated
Comment thread bincompat-go-http/README.md Outdated
Comment thread bincompat-go-http/setup.sh Outdated
@Criss-Ivana
Criss-Ivana marked this pull request as draft May 16, 2026 22:23
@razvand
razvand requested a lite review from Copilot August 21, 2026 10:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new bincompat-go-http example to catalog-core, intended to run a Linux ELF Go HTTP service (go-httpbin) on Unikraft via the ELF loader binary-compatibility layer.

Changes:

  • Added a new bincompat-go-http/ app scaffold (Unikraft build Makefile, Kconfig fragment, setup helper).
  • Added a rootfs build pipeline to produce a Linux ELF go-httpbin binary (Dockerfile + Makefile) and included Firecracker/QEMU run configs.
  • Added end-to-end documentation for building the rootfs, building Unikraft, and running under QEMU/Firecracker.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
bincompat-go-http/setup.sh Creates workdir/ structure and symlinks required repos (unikraft, libs, elfloader).
bincompat-go-http/rootfs/Makefile Builds/extracts a go-httpbin binary using Docker.
bincompat-go-http/rootfs/Dockerfile Defines the containerized build of a static-PIE go-httpbin ELF.
bincompat-go-http/README.md Documents setup, rootfs build, build/run steps for QEMU and Firecracker.
bincompat-go-http/Makefile.uk Unikraft app metadata hook (empty, consistent with other templates).
bincompat-go-http/Makefile Standard Unikraft wrapper makefile to build elfloader with required libs.
bincompat-go-http/fc.x86_64.json Firecracker config for x86_64 booting elfloader + initrd and running /go-httpbin.
bincompat-go-http/fc.arm64.json Firecracker config for arm64 booting elfloader + initrd and running /go-httpbin.
bincompat-go-http/Config.uk Kconfig selections for elfloader + networking + Go runtime needs and larger default stack.
bincompat-go-http/.gitignore Ignores workdir/ and the extracted rootfs binary.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread bincompat-go-httpbingo/rootfs/Makefile
Comment thread bincompat-go-http/rootfs/Dockerfile Outdated
Comment thread bincompat-go-http/rootfs/Dockerfile Outdated
Comment thread bincompat-go-http/README.md Outdated
@Criss-Ivana

Copy link
Copy Markdown
Author

@razvand Sorry I kept delaying this, I'll be able to have a look starting tomorrow.

Copy-pasting the commands doesn't work:

I'm finalizing stuff for GSoC and then I think I'll try to run it on a clean environment to see what the issue might be.

@razvand

razvand commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@razvand Sorry I kept delaying this, I'll be able to have a look starting tomorrow.

Copy-pasting the commands doesn't work:

I'm finalizing stuff for GSoC and then I think I'll try to run it on a clean environment to see what the issue might be.

Sure, no problem, @Criss-Ivana. We keep in touch here or on Discord.

If the PR is complete, from your point of view, make it a full PR (instead of just draft).

@Criss-Ivana
Criss-Ivana force-pushed the feat/bincompat-go-http branch 2 times, most recently from c6353ed to 73c4510 Compare August 23, 2026 12:28
Add a catalog-core application to run mccutchen/go-httpbin as a
Linux ELF via app-elfloader with lwIP networking. It includes a
rootfs Docker build, initrd packaging, and detailed instructions
in README.md for building and running on QEMU and Firecracker.

Signed-off-by: Cristian-Mihai Ivana <criss.ivana@gmail.com>
Go and similar Linux ELFs need posix-futex and posix-eventfd so
clone/pthread_create can succeed.

Signed-off-by: Cristian-Mihai Ivana <criss.ivana@gmail.com>
@Criss-Ivana
Criss-Ivana force-pushed the feat/bincompat-go-http branch from 73c4510 to 2b5b814 Compare August 23, 2026 17:48
@Criss-Ivana
Criss-Ivana marked this pull request as ready for review August 23, 2026 18:11
@Criss-Ivana
Criss-Ivana requested a review from razvand August 23, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants