Skip to content

Add Ruby::Box example - #647

Draft
ledsun wants to merge 2 commits into
ruby:mainfrom
ledsun:codex/add-ruby-box-example
Draft

Add Ruby::Box example#647
ledsun wants to merge 2 commits into
ruby:mainfrom
ledsun:codex/add-ruby-box-example

Conversation

@ledsun

@ledsun ledsun commented May 5, 2026

Copy link
Copy Markdown
Contributor

I'll keep this pull request as a draft until I've prepared automated tests for the Node.js examples.

Summary

  • add a Node.js example showing how to enable Ruby::Box with RUBY_BOX=1 when creating DefaultRubyVM
  • document the new example command in the ruby-wasm-wasi example README

How It Works

Run the following commands in the packages/npm-packages/ruby-wasm-wasi/example directory.

npm install
node ruby-box.node.js

Output:

(node:7650) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
ruby.wasm: warning: Ruby::Box is experimental, and the behavior may change in the future!
See https://docs.ruby-lang.org/en/master/Ruby/Box.html for known issues, etc.
Ruby::Box.enabled?: true
box::X: 123

@ledsun
ledsun marked this pull request as ready for review May 5, 2026 06:30
…ample

# Conflicts:
#	packages/npm-packages/ruby-wasm-wasi/example/README.md
@ledsun
ledsun marked this pull request as draft August 15, 2026 12:09
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.

1 participant