Skip to content

Add PicoRuby 3.4.2 with new r2p2 executable#2614

Open
hasumikin wants to merge 1 commit intorbenv:masterfrom
hasumikin:picoruby-3.4.2
Open

Add PicoRuby 3.4.2 with new r2p2 executable#2614
hasumikin wants to merge 1 commit intorbenv:masterfrom
hasumikin:picoruby-3.4.2

Conversation

@hasumikin
Copy link
Copy Markdown
Contributor

@hasumikin hasumikin commented Mar 29, 2026

This commit adds PicoRuby 3.4.2 and introduces a new build function to accommodate changes in the build artifacts. new artifacts: r2p2

Version numbering context:
PicoRuby's version numbers are aligned with mruby's VM code specification compatibility. Version 3.4 indicates compatibility with mruby 3.4 VM code format, or RITE0300. Version 3.4.2 indicates minor bug fix in PicoRuby.

Build artifact changes:
Starting from version 3.4.2, PicoRuby has replaced the irb executable with r2p2 (POSIX version of PicoRuby shell system including IRB). The new build produces three executables:

  • picoruby: main Ruby interpreter
  • picorbc: Ruby bytecode compiler
  • r2p2: interactive REPL (replaces picoirb)

Implementation:

  • Added build_package_picoruby_r2p2() function for version 3.4.2+
  • Existing build_package_picoruby() remains for version 3.0.0
  • The new function creates only the 'ruby' symlink, omitting 'irb'
  • Added conditional symlink logic in build_package_picoruby(): symlinks picoirb as irb if present
    • If there's no picoirb in artifacts, symlink for irb is not created
  • Added picoruby-3.4.2 definition file

The split in build functions allows proper support for both the legacy 3.0.0 release with irb and newer releases with r2p2.

Copy link
Copy Markdown
Member

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contribution and sorry for the late review!

Comment thread bin/ruby-build Outdated
ln -fs picoirb "$PREFIX_PATH/bin/irb"
}

build_package_picoruby_r2p2() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I appreciate the effort, but I am not sold on the separate build function for picoruby releases going forward. If the only change is that picoruby-3.4 does not ship with picoirb going forward, I would edit the existing build_package_picoruby function to make the following step be conditional based on the existence of picoirb:

ln -fs picoirb "$PREFIX_PATH/bin/irb"

Does that make sense or am I missing some potential drawbacks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mislav
You are right. I fixed my implementation. Check it again when you have time

This commit adds PicoRuby 3.4.2 and introduces a new artifacts: r2p2.

Version numbering context:
PicoRuby's version numbers are aligned with mruby's VM code specification compatibility.
Version 3.4 indicates compatibility with mruby 3.4 VM code format, or RITE0300.
Version 3.4.2 indicates minor bug fix in PicoRuby.

Build artifact changes:
Starting from version 3.4.2, PicoRuby has replaced the irb executable with r2p2 executable(POSIX version of PicoRuby shell system including IRB).
The new build produces three executables:
- picoruby: main Ruby interpreter
- picorbc: Ruby bytecode compiler
- r2p2: interactive REPL (replaces picoirb)

Implementation:
- Added conditional symlink logic in `build_package_picoruby()`: symlinks picoirb as irb if present
  - If there's no picoirb in artifacts, symlink for irb is not created
- Added picoruby-3.4.2 definition file
@hasumikin hasumikin changed the title Add PicoRuby 3.4.2 with new build function for r2p2 Add PicoRuby 3.4.2 with new r2p2 executable Apr 10, 2026
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