Skip to content

Add Ruby-Hello application with Firecracker support - #91

Open
lupsalexandra33 wants to merge 2 commits into
unikraft:mainfrom
lupsalexandra33:add-ruby-app
Open

Add Ruby-Hello application with Firecracker support#91
lupsalexandra33 wants to merge 2 commits into
unikraft:mainfrom
lupsalexandra33:add-ruby-app

Conversation

@lupsalexandra33

Copy link
Copy Markdown

This is a Draft PR for the Ruby-Hello application integration. I am following the standard Unikraft catalog structure (similar to other examples) to provide a simple Ruby unikernel example. I am opening this draft to get feedback on the current setup and guidance on build-time errors I am encountering.

Current Progress

1. App Integration: Added Config.uk, Makefile, and Makefile.uk for the ruby-hello application.

2. Setup Automation: Updated the top-level setup.sh to include lib-ruby and required dependencies (lib-newlib, lib-pthread-embedded).

3. Firecracker: Included a draft fc.x86_64.json for testing the application on Firecracker.

4. Documentation: Added a standard README.md with build and run instructions.

Current Blockers & Challenges

1. Ruby Version: I am currently using Ruby 2.6.0 from the lib-ruby repository.

2. Build Errors & Sequence:

I. Missing Auxiliary Files: The build first fails because it cannot find config.guess and config.sub.
II. Manual Workaround: If I manually add these files to the tool/ directory, the process moves forward but hits a second, more critical error.
III. Syntax Error: In the ./configure stage, I get: ./configure: line 4112: syntax error near unexpected token 'fi'.

Root Cause: This appears to be a compatibility issue between Ruby 2.6's older Autotools macros and the modern Autoconf environment on my host, which generates an invalid configuration script.

Fixes #25

@lupsalexandra33
lupsalexandra33 marked this pull request as ready for review March 18, 2026 13:03
@razvand
razvand requested review from raresgoidescu and a lite review from Copilot August 21, 2026 20:07
@razvand razvand self-assigned this Aug 21, 2026
@razvand razvand added the enhancement New feature or request label Aug 21, 2026

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

Adds a new ruby-hello Unikraft catalog application intended to demonstrate running a simple Ruby script, including draft Firecracker configuration and repo setup wiring.

Changes:

  • Extend top-level setup.sh to fetch Ruby-related libraries (lib-ruby, lib-newlib, lib-pthread-embedded).
  • Introduce a new ruby-hello/ app directory with Unikraft catalog scaffolding (Config.uk, Makefile, Makefile.uk, app setup script).
  • Add initial runtime assets and docs (helloworld.rb, fc.x86_64.json, README.md) for Firecracker execution.

Reviewed changes

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

Show a summary per file
File Description
setup.sh Adds cloning of Ruby and required dependency libraries into repos/.
ruby-hello/setup.sh Creates workdir/ and symlinks required core/libs into place for building the app.
ruby-hello/README.md Documents setup/build/run steps for the Ruby hello app.
ruby-hello/Makefile.uk Registers the app with Unikraft’s build system and adds rootfs-related flags.
ruby-hello/Makefile Defines the build invocation for the app (currently differs from established catalog Makefile pattern).
ruby-hello/helloworld.rb Provides a minimal Ruby script to run in the unikernel.
ruby-hello/fc.x86_64.json Draft Firecracker VM config to boot the resulting unikernel.
ruby-hello/Config.uk Kconfig entry for enabling the app and selecting required libraries.
Suppressed comments (1)

ruby-hello/fc.x86_64.json:5

  • boot_args passes /helloworld.rb, but this Firecracker config does not provide an initrd_path nor any vfs.fstab rootfs mount (unlike other apps that pass a file path, e.g., c-fs/fc.x86_64.json:3-6). As-is, the guest is unlikely to have /helloworld.rb available at runtime unless it is built into the image by some other mechanism.
    "kernel_image_path": "build/ruby-hello_kvm-x86_64",
    "boot_args": "ruby-hello_kvm-x86_64 -- /helloworld.rb"
  },

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

Comment thread ruby-hello/Makefile Outdated
Comment thread ruby-hello/fc.x86_64.json
Comment thread ruby-hello/Makefile.uk Outdated
Comment thread ruby-hello/README.md
Comment thread ruby-hello/Config.uk Outdated
Align the application with the catalog conventions: build into
`workdir/build/`, boot the `*_fc-*` images with an initrd-based rootfs
and document the standard set up, build and run steps.

Add the missing `fc.arm64.json`, `xen.*.cfg`, `.gitignore` and the
`Dockerfile` building the root filesystem with the Ruby standard
library.

Signed-off-by: Lupsa Alexandra <alexandra.lupsa1103@stud.acs.upb.ro>

@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.

Squash both commits into a single one. Be sure you sign the commit:

I get this error when building:

./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...                                                              
configure.ac:4001: the top level                                                                                               
configure.ac:4027: warning: AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS                                               
configure: error: cannot find required auxiliary files: config.guess config.sub                                                
make[3]: *** [/home/monkey/razvand/orgs/unikraft/maintainer-tools/workdir/libs/ruby/Makefile.uk:589: /home/monkey/razvand/orgs/unikraft/catalog-core/ruby-hello/workdir/build/libruby/.configured] Error 1   

Does the build work for you?

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

None yet

Development

Successfully merging this pull request may close these issues.

Add Ruby

3 participants