Skip to content

Add Ruby::Box example#647

Open
ledsun wants to merge 1 commit intoruby:mainfrom
ledsun:codex/add-ruby-box-example
Open

Add Ruby::Box example#647
ledsun wants to merge 1 commit intoruby:mainfrom
ledsun:codex/add-ruby-box-example

Conversation

@ledsun
Copy link
Copy Markdown
Contributor

@ledsun ledsun commented May 5, 2026

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