It might be able to be compiled to WASM. Someone built a Ruby to WASM compiler. Don't know how well it would work, but maybe...