raylib-ruby icon indicating copy to clipboard operation
raylib-ruby copied to clipboard

Web support

Open wilsonsilva opened this issue 2 years ago • 2 comments

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

wilsonsilva avatar Oct 21 '23 09:10 wilsonsilva

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.

satyam9721 avatar Nov 02 '23 17:11 satyam9721

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.

wilsonsilva avatar Nov 03 '23 05:11 wilsonsilva