ruby / ruby/ruby.wasm

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

Đang mở
#404 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Ruby
Star
875
Fork
68
Merge trung bình
9 ngày 5 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Xem lại FAQ hiện có và phần hỗ trợ gem ruby.wasm được mô tả trong issue. Xác định liệu các gem đơn giản có thể được cài đặt hoặc mô phỏng thông qua mã nguồn Ruby được nhúng và File.read() hay không, sau đó ghi lại cách tiếp cận được hỗ trợ, các giới hạn và một ví dụ cho trường hợp HelloWorld.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
ruby, wasm
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.