wasmerio / wasmer-ruby

💎🕸 WebAssembly runtime for Ruby
https://wasmer.io
MIT License
471 stars 18 forks source link

More parity with other languages #47

Closed sandstrom closed 3 years ago

sandstrom commented 3 years ago

It seems like the ruby sdk/client is still a bit behind the other languages. Would be awesome if more functionality was supported, for example terminate in host call, serialization and exposing host (imported) functions.

image

Source: https://docs.wasmer.io/ecosystem/wasmer/wasmer-features#language-embeddings

For our use case, we'd like to pass in a bunch of data from the host (e.g. JSON like data), pass in a bunch of functions, accessible to the WASM-code, and then call the function exposed by WASM (with ability to abort/terminate from host).

Hywan commented 3 years ago

Yup, it's in my agenda to rewrite this extension as it's been done for Python, Go and PHP!

sandstrom commented 3 years ago

@Hywan Awesome! 😄

Hywan commented 3 years ago

The project has been fully rewritten in #48. I'm updating the documentation right now, but if you check #48 you will see the project is now on-par with wasmer-python, wasmer-go, wasmer-php and wasmer itself.

Hywan commented 3 years ago

Closing in favor of https://github.com/wasmerio/docs.wasmer.io/pull/119.

sandstrom commented 3 years ago

Awesome @Hywan !! 🎉

(this is a long question, so I understand if you don't have time to answer)

Shopify published a post a few months ago, about how they're using WASM in a sandbox to evaluate foreign code in their ruby app.

https://shopify.engineering/shopify-webassembly

Would you say that wasmer.io is a good alternative tool for something similar to what they describe in that post? (they're using Lucet/Cranelift)