C/C++ within Ruby code?

后端 未结 6 2399
暗喜
暗喜 2021-02-10 09:39

C/C++ would be good option to write some of the performance critical aspects of a Ruby Application. I know this is possible.

I would like to know how to add C/C++ code i

6条回答
  •  天命终不由人
    2021-02-10 10:23

    We use ffi in one of our projects.

    Ruby-FFI is a ruby extension for programmatically loading dynamic libraries, binding functions within them, and calling those functions from Ruby code. Moreover, a Ruby-FFI extension works without changes on Ruby and JRuby.

    It works quite well.

提交回复
热议问题