0

Does mruby have the same FFI functions as Ruby? How do I call a C function from mruby? I am asking because I am considering the H20 web server with mruby scripting, but I need to be able to call c functions or programs from the mruby script.

iamoumuamua
  • 351
  • 2
  • 11
  • Here are some sample extension from the mruby repo: https://github.com/mruby/mruby/tree/master/examples – Casper Dec 05 '19 at 08:30

2 Answers2

0

I am disappointed that the super-uber stackoverflow community was unable to answer this question, but I was able to find an answer myself. Yay. Looks like I will be giving the H20 server a try. Hope someone else will eventually find this useful.

https://github.com/mrbgems/mruby-cfunc

iamoumuamua
  • 351
  • 2
  • 11
0

There is a mrbgem like CRuby FFI:

Though I haven't tested it in recent mruby releases so don't expect it to work as you expected.