Ruby Head compatibility
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 875
- Forks
- 68
- Avg merge
- 9d 5h
- Merged PRs (30d)
- 1
Description
I'm actively experimenting with the head Ruby builds (mostly due to #555) and collecting some compatibility
issues compared to 3.3 release here.
Gem/lib versions:
- ruby_wasm: 2.7.0
- js: 2.7.0
- Tempfile vs. /dev/null: https://github.com/ruby/tempfile/pull/38
This commit broke loading tempfile.rb: https://github.com/ruby/ruby/commit/136cbf04419acf993357701e54712f921a294355
require "tempfile"
# => 'File#initialize': No such file or directory @ rb_sysopen - /dev/null (Errno::ENOENT)
Not sure how to properly handle /dev/null in Wasm, though; maybe, we should return nil for IO::NULL and check for nil-ness whenever it's used 🤔
- Fails to require
digest/sha1: https://github.com/ruby/digest/pull/71
require "digest/sha1"
#=> <internal:/usr/local/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require': rb_digest_wrap_metadata not found (LoadError)
<internal:/usr/local/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
eval:3:in '<main>'
-e:in 'Kernel.eval'
Worked fine in 3.3.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two failures with ruby.wasm 2.7.0, starting with the require examples for tempfile.rb and digest/sha1. Review the referenced tempfile and digest pull requests and the Ruby commit, then compare behavior with Ruby 3.3. Done means both libraries load successfully in the head WebAssembly build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, wasm
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100