wilsonsilva / raylib-ruby

Ruby bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
https://raylib-ruby.com
zlib License
18 stars 1 forks source link

Web support #1

Open wilsonsilva opened 1 year ago

wilsonsilva commented 1 year ago

Ruby has recently introduced support for web compilation. I'm not sure how well it works with Emscriptien/FFI libraries.

satyam9721 commented 1 year ago

it's work with Emscripten. Emscripten is a complete Open Source compiler toolchain to WebAssembly. When developers have native code that lends itself to compilation to WASM, this native code could be used in Dart Web through JS interop.

However, we do not have a unified API for interacting with the same native library on Dart Native through dart:ffi, and on Dart Web through JS interop.

wilsonsilva commented 1 year ago

it's work with Emscripten. Emscripten is a complete Open Source compiler toolchain to WebAssembly. When developers have native code that lends itself to compilation to WASM, this native code could be used in Dart Web through JS interop.

However, we do not have a unified API for interacting with the same native library on Dart Native through dart:ffi, and on Dart Web through JS interop.

This is a Ruby repository. The native Raylib library, written in C compiles easily via Emscripten to WebAssembly. Compiling Ruby to Emscripten has also been done before. The issue here is compiling Ruby + C extensions/FFI bindings to WebAssembly.