1.传统的方法:通过rb_define_method 函数实现:
《Programming Ruby》(第二版)的第21章《Extending Ruby》
2.通过FFI。即Foreign Function Interface
:
3.可以用SWIG
:http://www.jiangmiao.org/blog/268.html
4.可以用RubyInline
:
《Programming Ruby》(第二版)的第21章《Extending Ruby》
2.通过FFI。即Foreign Function Interface
:
3.可以用SWIG
:http://www.jiangmiao.org/blog/268.html
4.可以用RubyInline
: