ruby / ruby/ruby.wasm

[FAQ] Is it possible to install simple gems? If not, how to simulate doing so?

未关闭
#404 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Ruby
星标
875
派生
68
平均合并
9 天 5 小时
30 天内合并 PR
1

描述

I suggest a new FAQ entry e. g. dealing with ruby gems via ruby.wasm.

Now, I assume right now this is not possible - that is ok. Please mention it in the FAQ.

But ... let's assume that some gems are simple.

Like a hello world gem:

class HelloWorld
  def initialize
  end
  def result?
    'Hello world!'
  end
end

So we can use the ruby.wasm .write() method onto result? (or any other
method name that is similar, this here is just an example).

Such code should work just fine. Just that it may be stored in a .gem file.

Is there a way to get support for that? In such a simple case we can probably
just embed the text (content of hello_world.rb) into the String that is evaluated,
so just File.read() should suffice. But I wonder whether there is some official
support for this via ruby.wasm. Many simple gems could be made to work
that way. (Of course other gems that are more complicated or require
Thread may not work, but perhaps in the future.)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

审查现有的 FAQ 以及 issue 中描述的 ruby.wasm gem 支持。确定是否可以通过嵌入的 Ruby 源代码和 File.read() 安装或模拟简单的 gem,然后记录受支持的方法、限制条件以及 HelloWorld 场景的示例。

由索引模型根据 Issue 内容生成。

评估

技术栈
ruby, wasm
领域
documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。