wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

Support Ruby as a guest language

Open sandstrom opened this issue 3 years ago • 9 comments

Just wanted to open an issue here, about adding support for Ruby as a guest language, i.e. "compiling" ruby down to a WebAssembly component.


Note: This is not about Ruby as a host language, to run WebAssembly code compiled in some other language, e.g. Rust or JS. For that scenario, there is already good support in this project.

sandstrom avatar Jan 28 '22 08:01 sandstrom

Unfortunately the Ruby bindings for Wasmtime itself are third-party, and appear to be unmaintained. So I can't imagine effort being directed toward supporting it in wit-bindgen unless somebody revives that project first.

jeffparsons avatar Feb 09 '22 01:02 jeffparsons

@jeffparsons Alright, makes sense.

Do you think wasmtime will bring ruby bindings under it's umbrella?

Python, a similar language, is already officially supported.

sandstrom avatar Feb 09 '22 11:02 sandstrom

I'd guess that whether or not the Bytecode Alliance will build and maintain their own Ruby bindings depends largely on whether any of the member organizations are heavily invested in Ruby already.

Python, a similar language, is already officially supported.

That might actually make it less likely that they'd be interested in Ruby bindings in the short term; they're already providing an example of integrating with that kind of language.

:man_shrugging: I'm just guessing here. I'd love to see Ruby bindings, too, because my employer uses a lot of Ruby and a lot of TypeScript. I reckon we could do some really cool stuff both on the server side itself and in sharing some code between server and client.

jeffparsons avatar Feb 11 '22 06:02 jeffparsons

@jeffparsons If you'd be interested in working on something in the Ruby<>Wasmtime space in your spare time, we could probably sponsor some of the work via Github. But I'm guessing you already have a lot of things on your plate.

sandstrom avatar Feb 11 '22 06:02 sandstrom

@jeffparsons If you'd be interested in working on something in the Ruby<>Wasmtime space in your spare time, we could probably sponsor some of the work via Github. But I'm guessing you already have a lot of things on your plate.

Good guess. :) It's definitely the kind of work I'd be interested in theoretically, but in practice $LIFE reasons (the positive kind) mean I have about zero hours free for that sort of thing.

It could be worth putting your feelers out into the Rust/Wasm/Ruby communities in general, on the off chance you might discover (a) people who might be suitable for that sort of work; and (b) other orgs who might be able to pitch in sponsorship.

jeffparsons avatar Feb 12 '22 04:02 jeffparsons

I understand :)

I'm already trying. This was one attempt, but I've also talked to some people on the wasmtime team.

sandstrom avatar Feb 12 '22 20:02 sandstrom